aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/draci/game.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index d52c78061e..aedc3b9a87 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -332,7 +332,8 @@ void Game::handleInventoryLoop() {
// animation ID. In this way, we obtain its itemID.
if (_animUnderCursor != NULL && _animUnderCursor != _inventoryAnim && _animUnderCursor->getID() != kOverlayImage) {
_itemUnderCursor = getItem(kInventoryItemsID - _animUnderCursor->getID());
- assert(_itemUnderCursor->_anim == _animUnderCursor);
+ if (_itemUnderCursor != NULL)
+ assert(_itemUnderCursor->_anim == _animUnderCursor);
} else {
_itemUnderCursor = NULL;
}