Check world for null in MusicPlayerLogic to prevent crashing the lobby

Fixes #6517
This commit is contained in:
Oliver Brakmann
2014-09-20 18:43:26 +02:00
parent bb21f8b5fa
commit 52d74886bd

View File

@@ -84,7 +84,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var installButton = widget.GetOrNull<ButtonWidget>("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 = () =>
{