aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/input_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/input_handler.cpp')
-rw-r--r--engines/titanic/input_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/titanic/input_handler.cpp b/engines/titanic/input_handler.cpp
index 7c35a5d855..2c51f3ece7 100644
--- a/engines/titanic/input_handler.cpp
+++ b/engines/titanic/input_handler.cpp
@@ -150,7 +150,7 @@ CGameObject *CInputHandler::dragEnd(const Point &pt, CTreeItem *dragItem) {
// Scan through the view items to find the item being dropped on
CGameObject *target = nullptr;
for (CTreeItem *treeItem = view->scan(view); treeItem; treeItem = treeItem->scan(view)) {
- CGameObject *gameObject = static_cast<CGameObject *>(treeItem);
+ CGameObject *gameObject = dynamic_cast<CGameObject *>(treeItem);
if (gameObject && gameObject != dragItem) {
if (gameObject->checkPoint(pt))
target = gameObject;