mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Build fix
This commit is contained in:
parent
8a93b1083f
commit
109139c913
@ -95,7 +95,8 @@ void TreasurePlacer::addAllPossibleObjects()
|
|||||||
PrisonHeroPlacer * prisonHeroPlacer = nullptr;
|
PrisonHeroPlacer * prisonHeroPlacer = nullptr;
|
||||||
for(auto & z : map.getZones())
|
for(auto & z : map.getZones())
|
||||||
{
|
{
|
||||||
if (prisonHeroPlacer = z.second->getModificator<PrisonHeroPlacer>())
|
prisonHeroPlacer = z.second->getModificator<PrisonHeroPlacer>();
|
||||||
|
if (prisonHeroPlacer)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -640,11 +641,12 @@ rmg::Object TreasurePlacer::constructTreasurePile(const std::vector<ObjectInfo*>
|
|||||||
|
|
||||||
auto * object = oi->generateObject();
|
auto * object = oi->generateObject();
|
||||||
|
|
||||||
// FIXME: Possible memory leak, but this is a weird case in first place
|
|
||||||
if(oi->templates.empty())
|
if(oi->templates.empty())
|
||||||
{
|
{
|
||||||
logGlobal->warn("Deleting randomized object with no templates: %s", object->getObjectName());
|
logGlobal->warn("Deleting randomized object with no templates: %s", object->getObjectName());
|
||||||
delete object; // FIXME: We also lose randomized hero or quest artifact
|
// Possible memory leak, but this is a weird case in first place
|
||||||
|
delete object;
|
||||||
|
// FIXME: We also lose randomized hero or quest artifact
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user