Core/Vmaps: Fixed crash in unloading vmaps

Closes #26536
This commit is contained in:
Shauren authored and Ovahlord committed 2021-05-22 10:24:47 +02:00
1 parent 37d67ac8d2
commit 659cb0992f
1 file changed
+2 -1
+2 -1
View File
@@ -348,9 +348,10 @@ namespace VMAP
{
for (loadedSpawnMap::iterator i = iLoadedSpawns.begin(); i != iLoadedSpawns.end(); ++i)
{
iTreeValues[i->first].setUnloaded();
for (uint32 refCount = 0; refCount < i->second; ++refCount)
vm->releaseModelInstance(iTreeValues[i->first].getWorldModel()->GetName());
iTreeValues[i->first].setUnloaded();
}
iLoadedSpawns.clear();
iLoadedTiles.clear();