From 1dd4882c00b82d9a2f138211dbc2c8c542e2af88 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 15 Jun 2013 04:59:43 -0300 Subject: Fixed Bug #7367 http://hercules.ws/board/tracker/issue-7367-error-vdb-destroy-during-shutting-down-of-server/ Signed-off-by: shennetsind --- src/map/npc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index f4027096c..46e6d0fd2 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1867,6 +1867,7 @@ int npc_unload(struct npc_data* nd, bool single) { aFree(nd->u.scr.timer_event); if (nd->src_id == 0) { if(nd->u.scr.script) { + script_stop_instances(nd->bl.id); script_free_code(nd->u.scr.script); nd->u.scr.script = NULL; } @@ -1885,8 +1886,6 @@ int npc_unload(struct npc_data* nd, bool single) { nd->ud = NULL; } - script_stop_sleeptimers(nd->bl.id); - aFree(nd); return 0; -- cgit v1.2.3-60-g2f50