From: terencehill Date: Wed, 6 Jul 2016 17:45:54 +0000 (+0200) Subject: Reset QuickMenu_Page_Command_Type when clearing up a quickmenu command otherwise... X-Git-Tag: xonotic-v0.8.2~700^2~87^2~7 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=ad834490441f3c38934d639edc109ef9d4c670cf;p=xonotic%2Fxonotic-data.pk3dir.git Reset QuickMenu_Page_Command_Type when clearing up a quickmenu command otherwise very bad things may happen (crash opening the hud editor) --- diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 08d97ffd2..d7d2b163d 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -58,6 +58,7 @@ void QuickMenu_Page_ClearEntry(int i) if (QuickMenu_Page_Command[i]) strunzone(QuickMenu_Page_Command[i]); QuickMenu_Page_Command[i] = string_null; + QuickMenu_Page_Command_Type[i] = 0; } float QuickMenu_Page_Load(string target_submenu, float new_page); @@ -660,7 +661,7 @@ void HUD_QuickMenu() else tokenize_console(substring(QuickMenu_Page_Command[i], 0, end)); - //if(argv(1) && argv(0) == "toggle") // already checked + if(argv(1) && argv(0) == "toggle") { // "enable feature xxx" "toggle xxx" (or "toggle xxx 1 0") // "disable feature xxx" "toggle xxx 0 1"