From: terencehill Date: Mon, 5 Mar 2018 15:35:59 +0000 (+0100) Subject: Check for cvar existence X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76758cdfc300197bd2e54c723e5349043b4af50a;p=xonotic%2Fxonotic-data.pk3dir.git Check for cvar existence --- diff --git a/qcsrc/menu/xonotic/keybinder.qc b/qcsrc/menu/xonotic/keybinder.qc index a7c27ed0e..5a8f2324d 100644 --- a/qcsrc/menu/xonotic/keybinder.qc +++ b/qcsrc/menu/xonotic/keybinder.qc @@ -174,7 +174,7 @@ string XonoticKeyBinder_toString(entity me) { string b = itos(me.bindmap); string name = strcat("_keybinder_mapname", b); - if (cvar_string(name) != "") + if ((cvar_type(name) & CVAR_TYPEFLAG_EXISTS) && cvar_string(name) != "") { return cvar_string(name); }