From 2bf3575f04ef2dc4c43a4c9b0545ff5c1ac54336 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 7 Feb 2011 19:05:49 +0100 Subject: [PATCH] Fix Map Info dialog can be opened by pressing ENTER in the map list if there are no maps for the current gametype This bug fix also disables other keys when there are no maps as there's nothing to do --- qcsrc/menu/xonotic/maplist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qcsrc/menu/xonotic/maplist.c b/qcsrc/menu/xonotic/maplist.c index 1390ff3b1..69757126b 100644 --- a/qcsrc/menu/xonotic/maplist.c +++ b/qcsrc/menu/xonotic/maplist.c @@ -297,6 +297,8 @@ void MapList_LoadMap(entity btn, entity me) float XonoticMapList_keyDown(entity me, float scan, float ascii, float shift) { string ch, save; + if(me.nItems <= 0) + return SUPER(XonoticMapList).keyDown(me, scan, ascii, shift); if(scan == K_ENTER || scan == K_KP_ENTER) { // pop up map info screen -- 2.39.2