diff options
Diffstat (limited to 'engines/sci/graphics/plane32.cpp')
-rw-r--r-- | engines/sci/graphics/plane32.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index d9e0d2d9ff..08708f2c45 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -201,10 +201,9 @@ void Plane::addPicInternal(const GuiResourceId pictureId, const Common::Point *p } else { screenItem->_position = celObj->_relativePosition; } - _screenItemList.add(screenItem); + screenItem->_celObj.reset(celObj); - delete screenItem->_celObj; - screenItem->_celObj = celObj; + _screenItemList.add(screenItem); } _type = (g_sci->_features->hasTransparentPicturePlanes() && transparent) ? kPlaneTypeTransparentPicture : kPlaneTypePicture; } |