diff --git a/lib/CTownHandler.cpp b/lib/CTownHandler.cpp index 5f75b59bf..4315eb9b7 100644 --- a/lib/CTownHandler.cpp +++ b/lib/CTownHandler.cpp @@ -82,7 +82,6 @@ CFaction::~CFaction() CTown::CTown() : faction(nullptr), mageLevel(0), primaryRes(0), moatDamage(0), defaultTavernChance(0) { - faction = nullptr; } CTown::~CTown() diff --git a/lib/mapping/MapFormatH3M.cpp b/lib/mapping/MapFormatH3M.cpp index 73cedfaf8..d9dd05d24 100644 --- a/lib/mapping/MapFormatH3M.cpp +++ b/lib/mapping/MapFormatH3M.cpp @@ -2231,7 +2231,7 @@ void CMapLoaderH3M::afterRead() for(auto obj : t.visitableObjects) { - if(obj->ID = Obj::TOWN) + if(obj->ID == Obj::TOWN || obj->ID == Obj::RANDOM_TOWN) { mainTown = obj; break;