mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix unloading of null objects
This commit is contained in:
parent
f7757c7991
commit
324d690eaf
|
@ -157,10 +157,13 @@ public:
|
|||
if (ori != nullptr)
|
||||
{
|
||||
Object * loadedObject = ori->LoadedObject;
|
||||
size_t index = GetLoadedObjectIndex(loadedObject);
|
||||
if (loadedObject != nullptr)
|
||||
{
|
||||
size_t index = GetLoadedObjectIndex(loadedObject);
|
||||
|
||||
UnloadObject(loadedObject);
|
||||
numObjectsUnloaded++;
|
||||
UnloadObject(loadedObject);
|
||||
numObjectsUnloaded++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue