diff options
author | Paul Gilbert | 2016-11-06 23:05:11 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-06 23:05:11 -0500 |
commit | 2e0e0f2d89593282f753ef2676724d71f5e969bf (patch) | |
tree | 829028de8250205b9f8a553b1e726f365cdea99c /engines | |
parent | 73030bd42f3bc3fb21bf44a9b0cb26e0f4b10e6e (diff) | |
download | scummvm-rg350-2e0e0f2d89593282f753ef2676724d71f5e969bf.tar.gz scummvm-rg350-2e0e0f2d89593282f753ef2676724d71f5e969bf.tar.bz2 scummvm-rg350-2e0e0f2d89593282f753ef2676724d71f5e969bf.zip |
TITANIC: Fix BellBot walking off
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/pet_control/pet_control.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 606a957e72..3c3efe1419 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -620,10 +620,13 @@ bool CPetControl::dismissBot(const CString &name) { CDismissBotMsg dismissMsg; for (CTreeItem *treeItem = view->getFirstChild(); treeItem; treeItem = treeItem->scan(view)) { - if (!treeItem->getName().compareToIgnoreCase(name)) - dismissMsg.execute(treeItem); - else - result = true; + CGameObject *obj = dynamic_cast<CGameObject *>(treeItem); + if (obj) { + if (!obj->getName().compareToIgnoreCase(name)) + result = true; + else + dismissMsg.execute(treeItem); + } } return result; |