diff options
author | Colin Snover | 2016-08-28 20:12:58 -0500 |
---|---|---|
committer | Colin Snover | 2016-09-29 19:39:16 -0500 |
commit | 5ab363a436151090d4ef1701c97ed7ed4f1e5c93 (patch) | |
tree | b2a15b14b0c2aa2f1241939825bedf7dff9e517f /engines | |
parent | d839d193cc24566456f48fa487a025f65656d2db (diff) | |
download | scummvm-rg350-5ab363a436151090d4ef1701c97ed7ed4f1e5c93.tar.gz scummvm-rg350-5ab363a436151090d4ef1701c97ed7ed4f1e5c93.tar.bz2 scummvm-rg350-5ab363a436151090d4ef1701c97ed7ed4f1e5c93.zip |
SCI32: Fix potential null pointer dereference
CID 1351620.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/plane32.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
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; } |