Fixed null reference exception when trying to dispose a sub with no preview image. Closes #503
This commit is contained in:
@@ -1312,7 +1312,7 @@ namespace Barotrauma
|
||||
{
|
||||
savedSubmarines.Remove(this);
|
||||
#if CLIENT
|
||||
PreviewImage.Remove();
|
||||
PreviewImage?.Remove();
|
||||
PreviewImage = null;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user