summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 98fdb350b..ed5980786 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1890,7 +1890,7 @@ int unit_free(struct block_list *bl, int clrtype)
aFree(md->guardian_data);
md->guardian_data = NULL;
}
- if (md->spawn && md->spawn_n < 0 && --(md->spawn->num) == 0)
+ if (md->spawn && !md->special_state.cached && --(md->spawn->num) == 0)
{ //Spawning data is not attached to the map, so free it
//if this is the last mob who is pointing at it.
aFree(md->spawn);