From 4b6b328bbb8b434c41f997023eb8c3fdb00e7242 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 10 Oct 2016 09:27:49 -0500 Subject: SCI32: Check for existence of visiblePlane before dereferencing CID 1351620. --- engines/sci/graphics/frameout.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3