summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-15 04:59:43 -0300
committershennetsind <ind@henn.et>2013-06-15 04:59:43 -0300
commit1dd4882c00b82d9a2f138211dbc2c8c542e2af88 (patch)
treecc6f7f610a73cb5a6470a71002f41473e38eebd7 /src/map/npc.c
parent634bcc63b7adff53d817c19195c4060170eeecfc (diff)
downloadhercules-1dd4882c00b82d9a2f138211dbc2c8c542e2af88.tar.gz
hercules-1dd4882c00b82d9a2f138211dbc2c8c542e2af88.tar.bz2
hercules-1dd4882c00b82d9a2f138211dbc2c8c542e2af88.tar.xz
hercules-1dd4882c00b82d9a2f138211dbc2c8c542e2af88.zip
Fixed Bug #7367
http://hercules.ws/board/tracker/issue-7367-error-vdb-destroy-during-shutting-down-of-server/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c3
1 files changed, 1 insertions, 2 deletions
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;