From cea612665879ce5c39f7c80c8eff8d7c41774f94 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 11 Feb 2006 18:06:54 +0000 Subject: [PATCH] Fixed crashes in the player setup menu. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1951 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/m_items.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/client/m_items.c b/engine/client/m_items.c index dae030838..0e04dfad8 100644 --- a/engine/client/m_items.c +++ b/engine/client/m_items.c @@ -1103,8 +1103,9 @@ void M_Complex_Key(int key) return; if (currentmenu->selecteditem && currentmenu->selecteditem->common.type == mt_custom && (key == K_DOWNARROW || key == K_UPARROW || key == K_TAB)) - if (currentmenu->selecteditem->custom.key(¤tmenu->selecteditem->custom, currentmenu, key)) - return; + if (currentmenu->selecteditem->custom.key) + if (currentmenu->selecteditem->custom.key(¤tmenu->selecteditem->custom, currentmenu, key)) + return; if (currentmenu->selecteditem && currentmenu->selecteditem->common.type == mt_bind) { @@ -1176,7 +1177,8 @@ void M_Complex_Key(int key) } break; case mt_custom: - currentmenu->selecteditem->custom.key(¤tmenu->selecteditem->custom, currentmenu, key); + if (currentmenu->selecteditem->custom.key) + currentmenu->selecteditem->custom.key(¤tmenu->selecteditem->custom, currentmenu, key); break; case mt_edit: MC_EditBox_Key(¤tmenu->selecteditem->edit, key);