mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
This commit is contained in:
parent
feae8b6ae4
commit
be5505690d
@ -194,9 +194,9 @@ TObjectTypeHandler CObjectClassesHandler::loadSubObjectFromJson(const std::strin
|
||||
assert(!scope.empty());
|
||||
|
||||
std::string handler = obj->handlerName;
|
||||
if(!handlerConstructors.count(obj->handlerName))
|
||||
if(!handlerConstructors.count(handler))
|
||||
{
|
||||
logMod->error("Handler with name %s was not found!", obj->handlerName);
|
||||
logMod->error("Handler with name %s was not found!", handler);
|
||||
// workaround for potential crash - if handler does not exists, continue with generic handler that is used for objects without any custom logc
|
||||
handler = "generic";
|
||||
assert(handlerConstructors.count(handler) != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user