aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-10-10 09:27:49 -0500
committerColin Snover2016-10-10 19:35:28 -0500
commit4b6b328bbb8b434c41f997023eb8c3fdb00e7242 (patch)
tree4de2303df52816a6cf28ac969c1a50faf0704919
parent1c2ed0c09468f8ee220a22f6c63cc6465632f67e (diff)
downloadscummvm-rg350-4b6b328bbb8b434c41f997023eb8c3fdb00e7242.tar.gz
scummvm-rg350-4b6b328bbb8b434c41f997023eb8c3fdb00e7242.tar.bz2
scummvm-rg350-4b6b328bbb8b434c41f997023eb8c3fdb00e7242.zip
SCI32: Check for existence of visiblePlane before dereferencing
CID 1351620.
-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;
}