fixed crash when loading of celx script failed

pull/398/head
GottfriedSp 2018-07-04 23:45:05 +02:00 committed by Hleb Valoshka
parent 6945c698b3
commit fdcba945ba
1 changed files with 3 additions and 0 deletions

View File

@ -915,6 +915,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)
{