diff options
author | Paul Gilbert | 2017-02-21 21:22:10 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-21 21:22:10 -0500 |
commit | 0706da838442f71cbcd7ffd4db9da1e932c06ac5 (patch) | |
tree | fb6076d8bf7ddd3a8bca4fc15bf43ecbc042bbaa /engines/titanic/npcs/bellbot.cpp | |
parent | 902ce47c059f3263685d0324f8da51fca059dc02 (diff) | |
download | scummvm-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/bellbot.cpp')
-rw-r--r-- | engines/titanic/npcs/bellbot.cpp | 4 |
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; } |