From fbc7200472802e425ae908b578e6e3415f358e6f Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 8 Mar 2011 20:24:52 +1300 Subject: [PATCH] fix #572 crash when switching mods while playing music --- OpenRA.Game/Game.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 2c3a95cdbd..5152ba991e 100755 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -266,9 +266,11 @@ namespace OpenRA var mm = mods.Where( m => Mod.AllMods.ContainsKey( m ) ).ToArray(); Console.WriteLine("Loading mods: {0}",string.Join(",",mm)); Settings.Game.Mods = mm; - Settings.Save(); - - Sound.Initialize(); + Settings.Save(); + + Sound.StopMusic(); + Sound.StopVideo(); + Sound.Initialize(); modData = new ModData( mm ); modData.LoadInitialAssets();