Skip to content

Commit

Permalink
SCI32: Fix potential null pointer dereference
Browse files Browse the repository at this point in the history
CID 1361026.
  • Loading branch information
csnover committed Sep 30, 2016
1 parent 4d3752f commit 327f8f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/sci/graphics/transitions32.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 327f8f8

Please sign in to comment.