Core/Transports: fixed a crash when loading db spawned transports

* fixed a memory leak
This commit is contained in:
Ovahlord committed 2019-02-25 04:39:01 +01:00
1 parent 8110e13914
commit 1f76228c1b
2 files changed
+12 -6

No files matched your search

+9 -6
View File
@@ -197,15 +197,18 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager<Gam
continue;
}
}
}
if (!obj->LoadFromDB(guid, map, false, false))
{
if (!obj->LoadFromDB(guid, map, false, false))
{
delete obj;
continue;
}
AddObjectHelper(cell, m, count, map, obj);
}
else
delete obj;
continue;
}
AddObjectHelper(cell, m, count, map, obj);
}
}