diff options
-rw-r--r-- | src/map/chat.c | 4 | ||||
-rw-r--r-- | src/map/map.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 2 |
3 files changed, 4 insertions, 4 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; diff --git a/src/map/map.c b/src/map/map.c index d3bf14381..3222c5579 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1186,9 +1186,9 @@ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr data) intif_delete_petdata( MakeDWord(fitem->item_data.card[1],fitem->item_data.card[2]) ); clif_clearflooritem(fitem,0); + map_deliddb(&fitem->bl); map_delblock(&fitem->bl); map_freeblock(&fitem->bl); - map_deliddb(&fitem->bl); return 0; } diff --git a/src/map/skill.c b/src/map/skill.c index 84bdfe5bd..db59a3bc9 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9898,8 +9898,8 @@ int skill_delunitgroup (struct block_list *src, struct skill_unit_group *group) group->valstr = NULL; } - map_freeblock(&group->unit->bl); // schedules deallocation of whole array (HACK) idb_remove(group_db, group->group_id); + map_freeblock(&group->unit->bl); // schedules deallocation of whole array (HACK) group->unit=NULL; group->group_id=0; group->unit_count=0; |