From b7ec6e535d314a64aeaf426e2e4c068cd7c4bb34 Mon Sep 17 00:00:00 2001 From: gumi Date: Mon, 1 Jan 2018 16:09:22 -0500 Subject: release v18.1.1 --- src/map/script-call.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/map/script-call.cpp') diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp index d54e234..7c7d4e6 100644 --- a/src/map/script-call.cpp +++ b/src/map/script-call.cpp @@ -383,6 +383,9 @@ void pop_stack(struct script_stack *stack, int start, int end) static ByteCode get_com(ScriptPointer *script) { + if (script == nullptr) + return ByteCode::NOP; + if (static_cast(script->peek()) >= 0x80) { // synthetic! Does not advance pos yet. @@ -742,10 +745,16 @@ void run_func(ScriptState *st) static void run_script_main(ScriptState *st, Borrowed rootscript) { + if (st == nullptr) + return; + int cmdcount = script_config.check_cmdcount; int gotocount = script_config.check_gotocount; struct script_stack *stack = st->stack; + if (stack == nullptr) + return; + st->defsp = stack->stack_datav.size(); int rerun_pos = st->scriptp.pos; -- cgit v1.2.3-60-g2f50