summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 2e198bb0d..34a18f033 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1695,6 +1695,13 @@ int map_quit(struct map_session_data *sd) {
sd->regstr = NULL;
sd->regstr_num = 0;
}
+ if (sd->st) {
+ if (sd->st->stack)
+ script_free_stack (sd->st->stack);
+ aFree(sd->st);
+ sd->st = NULL;
+ sd->npc_id = 0;
+ }
if(sd->fd)
{ //Player will be free'd on save-ack. [Skotlex]
if (session[sd->fd])