From: TimePath Date: Sat, 7 Feb 2015 08:45:19 +0000 (+1100) Subject: Don't call gameTypeChangeNotify() without a parent X-Git-Tag: xonotic-v0.8.1~124^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3fa4380d88bbb547e4fa89fbfe93d4c41638c627;p=xonotic%2Fxonotic-data.pk3dir.git Don't call gameTypeChangeNotify() without a parent Closes #1454 --- diff --git a/qcsrc/menu/xonotic/gametypelist.qc b/qcsrc/menu/xonotic/gametypelist.qc index 7469e6f8b..0d36c8363 100644 --- a/qcsrc/menu/xonotic/gametypelist.qc +++ b/qcsrc/menu/xonotic/gametypelist.qc @@ -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) {