Null ref checks on dispose

This commit is contained in:
Garry Newman 2016-10-21 11:00:24 +01:00
parent 5d23345955
commit b4c48242cb

View File

@ -25,14 +25,23 @@ public virtual void Dispose()
} }
Disposables.Clear(); Disposables.Clear();
Workshop.Dispose(); if ( Workshop != null )
Workshop = null; {
Workshop.Dispose();
Workshop = null;
}
Inventory.Dispose(); if ( Inventory != null )
Inventory = null; {
Inventory.Dispose();
Inventory = null;
}
Networking.Dispose(); if ( Networking != null )
Networking = null; {
Networking.Dispose();
Networking = null;
}
if ( native != null ) if ( native != null )
{ {