]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 7469e6f8b3926d4acdee69f7984ac5ef3f2df125..0d36c836340f7b463d2c0af41c9197990ec67619 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)
 {