Fixed crash in DynOS_Lvl_Activate()
This commit is contained in:
parent
7867949c0e
commit
37b6df7f5a
|
@ -84,6 +84,11 @@ void DynOS_Lvl_Activate(s32 modIndex, const SysPath &aFilename, const char *aLev
|
||||||
|
|
||||||
// Override vanilla script
|
// Override vanilla script
|
||||||
auto& newScripts = _Node->mLevelScripts;
|
auto& newScripts = _Node->mLevelScripts;
|
||||||
|
if (newScripts.Count() <= 0) {
|
||||||
|
PrintError("Could not find level scripts: '%s'", aLevelName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto& newScriptNode = newScripts[newScripts.Count() - 1];
|
auto& newScriptNode = newScripts[newScripts.Count() - 1];
|
||||||
const void* originalScript = DynOS_Builtin_ScriptPtr_GetFromName(newScriptNode->mName.begin());
|
const void* originalScript = DynOS_Builtin_ScriptPtr_GetFromName(newScriptNode->mName.begin());
|
||||||
if (originalScript == NULL) {
|
if (originalScript == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue