From 0f6f860c2039c29841f5a34a9a3c95c2e6b2b90e Mon Sep 17 00:00:00 2001 From: TheSaltyWaffle Date: Sun, 28 Dec 2014 17:46:34 +0100 Subject: [PATCH] Delete MenuState when game ends --- LeagueSharp.Common/LeagueSharp.Common/Menu.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LeagueSharp.Common/LeagueSharp.Common/Menu.cs b/LeagueSharp.Common/LeagueSharp.Common/Menu.cs index 8c6bf777..11f37278 100644 --- a/LeagueSharp.Common/LeagueSharp.Common/Menu.cs +++ b/LeagueSharp.Common/LeagueSharp.Common/Menu.cs @@ -687,6 +687,8 @@ public void AddToMainMenu() { InitMenuState(Assembly.GetCallingAssembly().GetName().Name); + CustomEvents.Game.OnGameEnd += delegate { UnloadMenuState(); }; + Game.OnGameEnd += delegate { UnloadMenuState(); }; AppDomain.CurrentDomain.DomainUnload += (sender, args) => UnloadMenuState(); AppDomain.CurrentDomain.ProcessExit += (sender, args) => UnloadMenuState();