Fixed memory leak caused by submarine preview images, changed Submarine.SavedSubmarines to a property that prevents removing submarines from outside the class without disposing the preview image. Closes #498
This commit is contained in:
@@ -144,7 +144,7 @@ namespace Barotrauma
|
||||
return true;
|
||||
};
|
||||
}
|
||||
if (Submarine.SavedSubmarines.Count > 0) subList.Select(Submarine.SavedSubmarines[0]);
|
||||
if (Submarine.SavedSubmarines.Any()) subList.Select(Submarine.SavedSubmarines.First());
|
||||
}
|
||||
|
||||
public void UpdateLoadMenu()
|
||||
|
||||
Reference in New Issue
Block a user