Skip to content

Commit

Permalink
Add missing null check in ShowRuntimeError (#227)
Browse files Browse the repository at this point in the history
Signed-off-by: Fox2Code <fox2code@gmail.com>
  • Loading branch information
Fox2Code authored Mar 27, 2024
1 parent 9a66b1b commit 1465b7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obse/obse/ScriptUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,7 @@ void ShowRuntimeError(Script* script, const char* fmt, ...)
char errorHeader[0x400];
// include mod filename, save having to ask users to figure it out themselves
const char* modName = "Savegame";
if (script->GetModIndex() != 0xFF)
if (script && script->GetModIndex() != 0xFF)
{
modName = (*g_dataHandler)->GetNthModName(script->GetModIndex());
if (!modName || !modName[0])
Expand Down

0 comments on commit 1465b7d

Please sign in to comment.