Fix script patches crashing game on unload (#590)
This commit is contained in:
@ -9,7 +9,7 @@ namespace big
|
||||
{
|
||||
uint8_t** orig_bytecode = program->m_code_blocks;
|
||||
|
||||
if (auto bytecode = g_script_patcher_service.get_script_bytecode(program->m_name_hash))
|
||||
if (auto bytecode = g_script_patcher_service->get_script_bytecode(program->m_name_hash); bytecode && g_running)
|
||||
program->m_code_blocks = bytecode;
|
||||
|
||||
auto ret = g_hooking->get_original<hooks::script_vm>()(start_stack, scr_globals, program, ctx);
|
||||
|
Reference in New Issue
Block a user