avoid a possible null return value musicTab

This commit is contained in:
Matthias Mailänder
2015-10-26 21:45:40 +01:00
parent 8b2245ad4e
commit d2ce79e580

View File

@@ -296,7 +296,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
playersTab.IsDisabled = () => panel == PanelType.Kick || panel == PanelType.ForceStart;
playersTab.OnClick = () => panel = PanelType.Players;
var musicTab = lobby.GetOrNull<ButtonWidget>("MUSIC_TAB");
var musicTab = lobby.Get<ButtonWidget>("MUSIC_TAB");
musicTab.IsHighlighted = () => panel == PanelType.Music;
musicTab.IsDisabled = () => panel == PanelType.Kick || panel == PanelType.ForceStart;
musicTab.OnClick = () => panel = PanelType.Music;