summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-23 14:05:20 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-23 14:05:20 +0000
commitd84ca1c320b8a4942ddc5d5cc53a20568cc8bd10 (patch)
tree777063aa8f754c43021c88b52801469b99447540 /src/map/chat.c
parented41067640c512709c2cdbed42241840a22ba23e (diff)
downloadhercules-d84ca1c320b8a4942ddc5d5cc53a20568cc8bd10.tar.gz
hercules-d84ca1c320b8a4942ddc5d5cc53a20568cc8bd10.tar.bz2
hercules-d84ca1c320b8a4942ddc5d5cc53a20568cc8bd10.tar.xz
hercules-d84ca1c320b8a4942ddc5d5cc53a20568cc8bd10.zip
Fixed several occurences of map_freeblock() being used before map_deliddb() (caused by r13503, r13505 and r13508) (bugreport:2959).
This would cause object ids (chatrooms / ground items) to never be removed when DEBUG_MEMMGR was turned on, ultimately causing a 'no free object id' fatal error. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13689 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chat.c')
-rw-r--r--src/map/chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/chat.c b/src/map/chat.c
index 413a4cf10..7306c70cf 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -174,9 +174,9 @@ int chat_leavechat(struct map_session_data* sd, bool kicked)
if( cd->users == 0 && cd->owner->type == BL_PC )
{ // Delete empty chatroom
clif_clearchat(cd, 0);
+ map_deliddb(&cd->bl);
map_delblock(&cd->bl);
map_freeblock(&cd->bl);
- map_deliddb(&cd->bl);
return 1;
}
@@ -327,9 +327,9 @@ int chat_deletenpcchat(struct npc_data* nd)
chat_npckickall(cd);
clif_clearchat(cd, 0);
+ map_deliddb(&cd->bl);
map_delblock(&cd->bl);
map_freeblock(&cd->bl);
- map_deliddb(&cd->bl);
nd->chat_id = 0;
return 0;