Adding a textblock with whitespace as the text doesn't blow up GUIListBoxes anymore, missing key bindings don't crash the game

This commit is contained in:
Regalis
2016-08-29 20:51:00 +03:00
parent 5de48a030e
commit 1dad116981
2 changed files with 11 additions and 6 deletions

View File

@@ -157,7 +157,7 @@ namespace Barotrauma
SetTextPos();
if (rect.Height == 0 && !string.IsNullOrWhiteSpace(Text))
if (rect.Height == 0 && !string.IsNullOrEmpty(Text))
{
this.rect.Height = (int)Font.MeasureString(wrappedText).Y;
}