Don't crash when the fonts are not yet loaded

closes #3157
This commit is contained in:
Matthias Mailänder
2013-04-27 09:52:53 +02:00
parent 7ec4bcad0e
commit 7bd253d56b
3 changed files with 11 additions and 3 deletions

View File

@@ -53,6 +53,9 @@ namespace OpenRA.Mods.D2k
if (lastLoadScreen.ElapsedTime() < 0.5)
return;
if (r.Fonts == null)
return;
lastLoadScreen.Reset();
var text = Comments.Random(Game.CosmeticRandom);
var textSize = r.Fonts["Bold"].Measure(text);