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);
|
savedSubmarines.Remove(this);
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
PreviewImage.Remove();
|
PreviewImage?.Remove();
|
||||||
PreviewImage = null;
|
PreviewImage = null;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user