From 915a7ea8715655da5d02d8f556857db752b6d98a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 May 2020 02:09:22 +0300 Subject: Dont call clif->clearunit_area if mob died on missing map --- src/map/clif.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 3289e80c5..1d4240350 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -936,8 +936,15 @@ static void clif_clearunit_area(struct block_list *bl, enum clr_type type) static int clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { struct block_list *bl = (struct block_list *)data; + nullpo_ret(bl); + Assert_ret(bl->m >= 0 && bl->m < map->count); + if (map->list[bl->m].block == NULL) { + // avoid error report for missing/removed map + ers_free(clif->delay_clearunit_ers, bl); + return 0; + } clif->clearunit_area(bl, (enum clr_type) id); - ers_free(clif->delay_clearunit_ers,bl); + ers_free(clif->delay_clearunit_ers, bl); return 0; } -- cgit v1.2.3-60-g2f50