diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs index bc168a604b..ffac1a4c00 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs @@ -190,13 +190,10 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic chatTemplate = chatPanel.GetWidget("CHAT_TEMPLATE"); chatPanel.RemoveChildren(); - lobby.GetWidget("MUSIC_BUTTON").OnClick = () => - { - Widget.OpenWindow("MUSIC_PANEL", new WidgetArgs() - { - { "onExit", () => {} }, - }); - }; + var musicButton = lobby.GetWidget("MUSIC_BUTTON"); + if (musicButton != null) + musicButton.OnClick = () => Widget.OpenWindow("MUSIC_PANEL", new WidgetArgs + { { "onExit", () => {} } }); // Add a bot on the first lobbyinfo update if (addBots)