]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Check for cvar existence
authorterencehill <piuntn@gmail.com>
Mon, 5 Mar 2018 15:35:59 +0000 (16:35 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 5 Mar 2018 15:35:59 +0000 (16:35 +0100)
qcsrc/menu/xonotic/keybinder.qc

index a7c27ed0e36d3511eb7f3abc01c5642fdcf05da2..5a8f2324d88babdeb9c68d4d8839448e48c4eda1 100644 (file)
@@ -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);
        }