From 1c2e90a46f6b3449dd83fab490cfcb747d3b3356 Mon Sep 17 00:00:00 2001 From: Dastgir Date: Sun, 2 Sep 2018 11:36:16 +0530 Subject: Fixes #2173 Fixes crash when character is removed from `char` table but not from guild_member. --- src/char/int_guild.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/char/int_guild.c b/src/char/int_guild.c index e03278fad..56e1c1ba3 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -443,7 +443,9 @@ static struct guild *inter_guild_fromsql(int guild_id) if( m->position >= MAX_GUILDPOSITION ) // Fix reduction of MAX_GUILDPOSITION [PoW] m->position = MAX_GUILDPOSITION - 1; SQL->GetData(inter->sql_handle, 11, &data, &len); memcpy(m->name, data, min(len, NAME_LENGTH)); - SQL->GetData(inter->sql_handle, 12, &data, NULL); m->last_login = atoi(data); + SQL->GetData(inter->sql_handle, 12, &data, NULL); + if (data != NULL) + m->last_login = atoi(data); m->modified = GS_MEMBER_UNMODIFIED; } -- cgit v1.2.3-70-g09d2