From 7b98bc76e298fa80bb0b1fb16f5b48c7009115d4 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Fri, 20 May 2022 10:31:24 +0300 Subject: [PATCH] Fix potential crash in opCreateObject --- src/interpreter_extra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/interpreter_extra.c b/src/interpreter_extra.c index c0be24e..3be7860 100644 --- a/src/interpreter_extra.c +++ b/src/interpreter_extra.c @@ -899,6 +899,9 @@ void opCreateObject(Program* program) tileWindowRefreshRect(&rect, object->elevation); } } + } else { + // SFALL: Prevent a crash when the proto is missing. + goto out; } if (sid != -1) {