diff options
Diffstat (limited to 'engines/cryomni3d/objects.cpp')
-rw-r--r-- | engines/cryomni3d/objects.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/cryomni3d/objects.cpp b/engines/cryomni3d/objects.cpp index 1c06eb1ea1..5d79c5f56c 100644 --- a/engines/cryomni3d/objects.cpp +++ b/engines/cryomni3d/objects.cpp @@ -69,6 +69,7 @@ void Inventory::remove(unsigned int position) { void Inventory::removeByIconID(unsigned int iconID) { for (iterator it = begin(); it != end(); it++) { if ((*it) && (*it)->idCA() == iconID) { + deselectObject(); remove(it - begin()); return; } @@ -79,6 +80,7 @@ void Inventory::removeByIconID(unsigned int iconID) { void Inventory::removeByNameID(unsigned int nameID) { for (iterator it = begin(); it != end(); it++) { if ((*it) && (*it)->idOBJ() == nameID) { + deselectObject(); remove(it - begin()); return; } |