From 5ab363a436151090d4ef1701c97ed7ed4f1e5c93 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sun, 28 Aug 2016 20:12:58 -0500 Subject: SCI32: Fix potential null pointer dereference CID 1351620. --- engines/sci/graphics/plane32.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index 1cd88d667b..e7da8b815d 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -527,14 +527,8 @@ void Plane::decrementScreenItemArrayCounts(Plane *visiblePlane, const bool force if (item != nullptr) { // update item in visiblePlane if item is updated - if ( - item->_updated || - ( - forceUpdate && - visiblePlane != nullptr && - visiblePlane->_screenItemList.findByObject(item->_object) != nullptr - ) - ) { + if (visiblePlane != nullptr && ( + item->_updated || (forceUpdate && visiblePlane->_screenItemList.findByObject(item->_object) != nullptr))) { *visiblePlane->_screenItemList[i] = *item; } -- cgit v1.2.3