aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-21 21:22:10 -0500
committerPaul Gilbert2017-02-21 21:22:10 -0500
commit0706da838442f71cbcd7ffd4db9da1e932c06ac5 (patch)
treefb6076d8bf7ddd3a8bca4fc15bf43ecbc042bbaa /engines/titanic/npcs
parent902ce47c059f3263685d0324f8da51fca059dc02 (diff)
downloadscummvm-rg350-0706da838442f71cbcd7ffd4db9da1e932c06ac5.tar.gz
scummvm-rg350-0706da838442f71cbcd7ffd4db9da1e932c06ac5.tar.bz2
scummvm-rg350-0706da838442f71cbcd7ffd4db9da1e932c06ac5.zip
TITANIC: Assert dynamic_cast result in CBellot::Use
Diffstat (limited to 'engines/titanic/npcs')
-rw-r--r--engines/titanic/npcs/bellbot.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp
index 36c57fe467..1782161aea 100644
--- a/engines/titanic/npcs/bellbot.cpp
+++ b/engines/titanic/npcs/bellbot.cpp
@@ -135,7 +135,9 @@ bool CBellBot::MovieEndMsg(CMovieEndMsg *msg) {
}
bool CBellBot::Use(CUse *msg) {
- dynamic_cast<CCarry *>(msg->_item)->_npcUse = "Bellbot";
+ CCarry *item = dynamic_cast<CCarry *>(msg->_item);
+ assert(item);
+ item->_npcUse = "Bellbot";
return true;
}