diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-17 16:14:29 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-17 16:14:29 +0000 |
commit | 139b774dd07e3dab16c62956c19a571c498e1ac0 (patch) | |
tree | 1d85bc700b55524782bba657a91c52e54d1384fd /src/map | |
parent | 6f873d7c6e2812be283109f04c48cbc42a75dfb3 (diff) | |
download | hercules-139b774dd07e3dab16c62956c19a571c498e1ac0.tar.gz hercules-139b774dd07e3dab16c62956c19a571c498e1ac0.tar.bz2 hercules-139b774dd07e3dab16c62956c19a571c498e1ac0.tar.xz hercules-139b774dd07e3dab16c62956c19a571c498e1ac0.zip |
Reappropriate my previous fix on map_foreachiddb, it's npc_unload's problem.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5647 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/npc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 8f9e5ed81..56affa0b5 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1532,7 +1532,10 @@ static int npc_unload_ev(DBKey key,void *data,va_list ap) { int npc_unload (struct npc_data *nd)
{
+ nullpo_retv(nd);
+
npc_remove_map (nd);
+ map_deliddb(&nd->bl);
if (nd->chat_id) {
struct chat_data *cd = (struct chat_data*)map_id2bl(nd->chat_id);
@@ -2794,7 +2797,6 @@ static int npc_cleanup_sub (struct block_list *bl, va_list ap) { }
static int npc_cleanup_dbsub(DBKey key,void * data,va_list app) {
- map_deliddb((struct block_list*)data);
return npc_cleanup_sub((struct block_list*)data, 0);
}
|