Fixed nullref exception in NetLobbyScreen when selecting a level seed that has no background sprite defined

This commit is contained in:
Joonas Rikkonen
2018-07-23 18:33:04 +03:00
parent 9d1c4f3efb
commit 12c6a081a9

View File

@@ -177,7 +177,7 @@ namespace Barotrauma
if (levelSeed == value) return;
levelSeed = value;
backgroundSprite = LocationType.Random(levelSeed).Background;
backgroundSprite = LocationType.Random(levelSeed)?.Background;
seedBox.Text = levelSeed;
}
}