(5d73de170) Fixed RefreshSavedSub removing an extra sub from the list (causing an index out of range exception if refreshing a sub at the end of the list)

This commit is contained in:
Joonas Rikkonen
2019-04-06 17:48:13 +03:00
parent 8e56174d28
commit c94f888c4d
3 changed files with 101 additions and 28 deletions
@@ -1111,7 +1111,6 @@ namespace Barotrauma
if (Path.GetFullPath(savedSubmarines[i].filePath) == fullPath)
{
savedSubmarines[i].Dispose();
savedSubmarines.RemoveAt(i);
}
}
savedSubmarines.Add(new Submarine(filePath));