Fixes crash in replay mode introduced in 28bdd8540f.

This was SVN commit r15571.
This commit is contained in:
Yves 2014-07-27 17:28:36 +00:00
parent fe8e19ebfe
commit cef9e7d4f0

View File

@ -242,9 +242,9 @@ PSRETURN CGame::ReallyStartGame()
Render();
// Call the reallyStartGame GUI function, but only if it exists
JS::RootedValue global(cx, g_GUI->GetActiveGUI()->GetGlobalObject());
if (g_GUI && g_GUI->HasPages())
{
JS::RootedValue global(cx, g_GUI->GetActiveGUI()->GetGlobalObject());
if (g_GUI->GetActiveGUI()->GetScriptInterface()->HasProperty(global, "reallyStartGame"))
g_GUI->GetActiveGUI()->GetScriptInterface()->CallFunctionVoid(global, "reallyStartGame");
}