From 0706da838442f71cbcd7ffd4db9da1e932c06ac5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 21 Feb 2017 21:22:10 -0500 Subject: TITANIC: Assert dynamic_cast result in CBellot::Use --- engines/titanic/npcs/bellbot.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(msg->_item)->_npcUse = "Bellbot"; + CCarry *item = dynamic_cast(msg->_item); + assert(item); + item->_npcUse = "Bellbot"; return true; } -- cgit v1.2.3