aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/game_nebular.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 34eb6f140c..b36de8f378 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -619,7 +619,7 @@ void GameNebular::unhandledAction() {
_vm->_dialogs->show(0x15);
} else if (action.isAction(VERB_TAKE)) {
int objId = _vm->_game->_objects.getIdFromDesc(action._activeAction._objectNameId);
- if (_vm->_game->_objects.isInInventory(objId))
+ if (objId >= 0 && _vm->_game->_objects.isInInventory(objId))
_vm->_dialogs->show(0x10);
else if (randVal <= 333)
_vm->_dialogs->show(0x8);