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
This commit is contained in:
Spoike 2006-02-11 18:06:54 +00:00
parent 2120d9bba8
commit cea6126658

View file

@ -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(&currentmenu->selecteditem->custom, currentmenu, key))
return;
if (currentmenu->selecteditem->custom.key)
if (currentmenu->selecteditem->custom.key(&currentmenu->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(&currentmenu->selecteditem->custom, currentmenu, key);
if (currentmenu->selecteditem->custom.key)
currentmenu->selecteditem->custom.key(&currentmenu->selecteditem->custom, currentmenu, key);
break;
case mt_edit:
MC_EditBox_Key(&currentmenu->selecteditem->edit, key);