Fix potential crash in opCreateObject

This commit is contained in:
Alexander Batalov 2022-05-20 10:31:24 +03:00
parent ac9293c3d5
commit 7b98bc76e2
1 changed files with 3 additions and 0 deletions

View File

@ -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) {