]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/radiobutton.qc
Make sure all classes that control a cvar initialize cvarName to string_null in their...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / radiobutton.qc
index 7e999392420a5ae283db81828e6aa8c9fd6eceea..27282207795580b122182c1b38c5c47546594d7f 100644 (file)
@@ -40,11 +40,8 @@ entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, s
 }
 void XonoticRadioButton_configureXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText, string theTooltip)
 {
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.loadCvars(me);
-       }
+       me.cvarName = (theCvar) ? theCvar : string_null;
+       me.loadCvars(me);
        setZonedTooltip(me, theTooltip, theCvar);
        me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
 }