From 327f8f829941e544ef6d97f5ff816d6190c499d1 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sun, 28 Aug 2016 20:22:29 -0500 Subject: SCI32: Fix potential null pointer dereference CID 1361026. --- engines/sci/graphics/transitions32.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/sci/graphics/transitions32.cpp') diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp index c0b1c075c8..b93f0f7917 100644 --- a/engines/sci/graphics/transitions32.cpp +++ b/engines/sci/graphics/transitions32.cpp @@ -965,6 +965,10 @@ bool GfxTransitions32::processScroll(PlaneScroll &scroll) { Plane *plane = g_sci->_gfxFrameout->getPlanes().findByObject(scroll.plane); + if (plane == nullptr) { + error("[GfxTransitions32::processScroll]: Plane %04x:%04x not found", PRINT_REG(scroll.plane)); + } + if ((scroll.x == 0) && (scroll.y == 0)) { plane->deletePic(scroll.oldPictureId, scroll.newPictureId); finished = true; -- cgit v1.2.3