Fixed mapserver crash on script command warp (#2766)
Fixes #2765 Thanks to @LunarSHINING
This commit is contained in:
@@ -304,7 +304,7 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat
|
||||
/*==========================================
|
||||
* Dequeue event and add timer for execution (100ms)
|
||||
*------------------------------------------*/
|
||||
int npc_event_dequeue(struct map_session_data* sd)
|
||||
int npc_event_dequeue(struct map_session_data* sd,bool free_script_stack)
|
||||
{
|
||||
nullpo_ret(sd);
|
||||
|
||||
@@ -314,7 +314,7 @@ int npc_event_dequeue(struct map_session_data* sd)
|
||||
clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
|
||||
sd->state.using_fake_npc = 0;
|
||||
}
|
||||
if (sd->st) {
|
||||
if (free_script_stack&&sd->st) {
|
||||
script_free_state(sd->st);
|
||||
sd->st = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user