Fixed crash for PC based MAME drivers (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2011-01-23 16:24:53 +00:00
parent 551ee8ee7e
commit f0d87d6941

View File

@ -2428,7 +2428,7 @@ static void input_port_update_hook(running_machine *machine, const input_port_co
keybuf = get_buffer(machine);
/* is the key down right now? */
if (keybuf->status_keydown && (keybuf->begin_pos != keybuf->end_pos))
if (keybuf && keybuf->status_keydown && (keybuf->begin_pos != keybuf->end_pos))
{
/* identify the character that is down right now, and its component codes */
ch = keybuf->buffer[keybuf->begin_pos];