summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-14 11:46:24 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-14 11:46:24 +0000
commit55984b91c03d25e7a6cae535043cd49815cf9e24 (patch)
treed7394e545aecf632d6738540f17465fb057940b5 /src/map
parent9e03b158bb2f558c79a8df988cacf7bdf66df12e (diff)
downloadhercules-55984b91c03d25e7a6cae535043cd49815cf9e24.tar.gz
hercules-55984b91c03d25e7a6cae535043cd49815cf9e24.tar.bz2
hercules-55984b91c03d25e7a6cae535043cd49815cf9e24.tar.xz
hercules-55984b91c03d25e7a6cae535043cd49815cf9e24.zip
Fixed Nick DB code using uninitialized data (bugreport:5439).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15687 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-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 )