diff options
author | shennetsind <ind@henn.et> | 2013-05-31 01:12:33 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-31 01:12:33 -0300 |
commit | 7b2a2c25488395cb3ceef3cb0e5cc632d58c9793 (patch) | |
tree | 9979a81d4bcf919cd36d5b21149ba0f799bf9546 /src/map/script.c | |
parent | 2f7540f224aba85063feaff69bd46f288bea7f11 (diff) | |
download | hercules-7b2a2c25488395cb3ceef3cb0e5cc632d58c9793.tar.gz hercules-7b2a2c25488395cb3ceef3cb0e5cc632d58c9793.tar.bz2 hercules-7b2a2c25488395cb3ceef3cb0e5cc632d58c9793.tar.xz hercules-7b2a2c25488395cb3ceef3cb0e5cc632d58c9793.zip |
Fixed Bug #7291
Special Thanks to Haru!
http://hercules.ws/board/tracker/issue-7291-segmentation-fault-in-run-script-main-on-mapserver-startup/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 07497d892..959cf6bd9 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3464,8 +3464,10 @@ void run_script_main(struct script_state *st) script_attach_state(st); nd = map_id2nd(st->oid); - if( nd ) + if( nd && nd->bl.m >= 0 ) st->instance_id = map[nd->bl.m].instance_id; + else + st->instance_id = -1; if(st->state == RERUNLINE) { run_func(st); |