1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-25 00:37:24 +02:00

Fix crash on hovering Market of Time (unfinished H3 object)

This commit is contained in:
Ivan Savenko
2023-03-06 00:35:10 +02:00
parent 1d03900f16
commit 0b3c10d990

View File

@ -404,7 +404,7 @@ void CObjectClassesHandler::afterLoadFinalization()
std::string CObjectClassesHandler::getObjectName(si32 type, si32 subtype) const
{
const auto handler = getHandlerFor(type, subtype);
if (handler->hasNameTextID())
if (handler && handler->hasNameTextID())
return handler->getNameTranslated();
else
return objects[type]->getNameTranslated();