(c225b9831) Fixed crashing if none of the selected content packages contain location portraits suitable for the main menu.

This commit is contained in:
Joonas Rikkonen
2019-04-03 16:20:52 +03:00
parent 03f2444968
commit e4eb6c131c
@@ -688,7 +688,7 @@ namespace Barotrauma
if (backgroundSprite == null) if (backgroundSprite == null)
{ {
backgroundSprite = (LocationType.List.Where(l => l.UseInMainMenu).GetRandom()).GetPortrait(0); backgroundSprite = (LocationType.List.Where(l => l.UseInMainMenu).GetRandom())?.GetPortrait(0);
} }
if (backgroundSprite != null) if (backgroundSprite != null)