Don't call gameTypeChangeNotify() without a parent
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 7 Feb 2015 08:45:19 +0000 (19:45 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 7 Feb 2015 08:45:19 +0000 (19:45 +1100)
Closes #1454

qcsrc/menu/xonotic/gametypelist.qc

index 7469e6f..0d36c83 100644 (file)
@@ -71,7 +71,10 @@ void XonoticGametypeList_saveCvars(entity me)
                return;
        }
        MapInfo_SwitchGameType(t);
-       me.parent.gameTypeChangeNotify(me.parent);
+       entity owner = me.parent;
+       if (owner) { // not set immediately
+               owner.gameTypeChangeNotify(owner);
+       }
 }
 void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {