Core/Collision: Fix memory leak
This commit is contained in:
1 parent
36894b09b3
commit
7ccbbdddd8
2 files changed
+40
-42
No files matched your search
@@ -96,7 +96,10 @@ namespace VMAP
|
||||
std::string mapFileName = getMapFileName(mapId);
|
||||
StaticMapTree* newTree = new StaticMapTree(mapId, basePath);
|
||||
if (!newTree->InitMap(mapFileName, this))
|
||||
{
|
||||
delete newTree;
|
||||
return false;
|
||||
}
|
||||
instanceTree = iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId, newTree)).first;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user