summaryrefslogtreecommitdiff
path: root/src/map/elemental.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/elemental.c')
-rw-r--r--src/map/elemental.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/elemental.c b/src/map/elemental.c
index caba02692..b594c8899 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -218,6 +218,9 @@ int elemental_delete(struct elemental_data *ed, int reply) {
sd->ed = NULL;
sd->status.ele_id = 0;
+ if( !ed->bl.prev )
+ return unit->free(&ed->bl, 0);
+
return unit->remove_map(&ed->bl, 0, ALC_MARK);
}