Prevented a potential null access

This commit is contained in:
2022-10-03 20:04:56 +01:00
parent 37663efcc0
commit 4ca1c80015
3 changed files with 6 additions and 1 deletions

View File

@@ -146,7 +146,9 @@ void freeEngine() {
static void execStep() {
//call onStep
callEngineNode(engine.rootNode, &engine.interpreter, "onStep");
if (engine.rootNode != NULL) {
callEngineNode(engine.rootNode, &engine.interpreter, "onStep");
}
//poll events
SDL_Event event;