From 52d74886bdfed4264206bc1ebc7e05b7274e6d28 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sat, 20 Sep 2014 18:43:26 +0200 Subject: [PATCH] Check world for null in MusicPlayerLogic to prevent crashing the lobby Fixes #6517 --- OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs index e155941ff0..c3d1252729 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs @@ -84,7 +84,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic var installButton = widget.GetOrNull("INSTALL_BUTTON"); if (installButton != null) { - installButton.IsDisabled = () => !world.IsShellmap; + installButton.IsDisabled = () => world == null || !world.IsShellmap; var args = new string[] { "Launch.Window=INSTALL_MUSIC_PANEL" }; installButton.OnClick = () => {