summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 172f921ea..7879576a5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1516,9 +1516,7 @@ void map_delnickdb(int charid, const char* name)
struct map_session_data* sd;
DBData data;
- nick_db->remove(nick_db, db_i2key(charid), &data);
- p = db_data2ptr(&data);
- if( p == NULL )
+ if (!nick_db->remove(nick_db, db_i2key(charid), &data) || (p = db_data2ptr(&data)) == NULL)
return;
while( p->requests )