fixed crash when loading of celx script failed

pull/110/head
GottfriedSp 2018-07-04 23:45:05 +02:00 committed by Hleb Valoshka
parent 87c3e973be
commit 5b8f243233
1 changed files with 3 additions and 0 deletions

View File

@ -919,6 +919,9 @@ bool LuaState::handleMouseButtonEvent(float x, float y, int button, bool down)
// Returns true if a handler is registered for the tick event
bool LuaState::handleTickEvent(double dt)
{
if (!costate)
return true;
CelestiaCore* appCore = getAppCore(costate, NoErrors);
if (appCore == NULL)
{