diff --git a/server/CQuery.cpp b/server/CQuery.cpp index 3d07d3af0..aad12a423 100644 --- a/server/CQuery.cpp +++ b/server/CQuery.cpp @@ -321,7 +321,7 @@ CBlockingDialogQuery::CBlockingDialogQuery(const BlockingDialog &bd) void CTeleportDialogQuery::notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const { - auto obj = dynamic_cast(objectVisit.visitedObject); + auto obj = dynamic_ptr_cast(objectVisit.visitedObject); obj->teleportDialogAnswered(objectVisit.visitingHero, *answer, td.exits); }