aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/graphics/frameout.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 94518413da..843fe5ed86 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -1004,6 +1004,10 @@ void GfxFrameout::calcLists(ScreenItemListList &drawLists, EraseListList &eraseL
_visiblePlanes.add(new Plane(plane));
--plane._created;
} else if (plane._updated) {
+ if (visiblePlane == nullptr) {
+ error("[GfxFrameout::calcLists]: Attempt to update nonexistent visible plane");
+ }
+
*visiblePlane = plane;
--plane._updated;
}