From 9b6e65165687599046d3353f0744510bd0e3ff9b Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 23 Apr 2015 22:18:39 +0200 Subject: [PATCH] Fix last menu closing bugging out on new rounds. --- lua/autorun/client/prophunt_tauntmenu.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/autorun/client/prophunt_tauntmenu.lua b/lua/autorun/client/prophunt_tauntmenu.lua index 6e07da1..0b5d562 100644 --- a/lua/autorun/client/prophunt_tauntmenu.lua +++ b/lua/autorun/client/prophunt_tauntmenu.lua @@ -102,11 +102,11 @@ end hook.Add( "PlayerBindPress", "PlayerBindPressFKeyMenus", function(pl, bind, pressed) if bind == "gm_showspare2" and pressed then - if lastMenu ~= nil then + if IsValid(lastMenu) and lastMenu ~= nil then lastMenu:Hide() end lastMenu = CreateMenu() - if lastMenu ~= nil then + if IsValid(lastMenu) and lastMenu ~= nil then lastMenu:Open() end end