Skip to content

Commit

Permalink
Do not queue empty cmd.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25256 b3059339-0415-0410-9bf9-f77b7e298cf2
  • Loading branch information
ulion committed Dec 2, 2007
1 parent 8373b55 commit 9870aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ static mp_cmd_t *read_events(int time, int paused)

int
mp_input_queue_cmd(mp_cmd_t* cmd) {
if(cmd_queue_length >= CMD_QUEUE_SIZE)
if(!cmd || cmd_queue_length >= CMD_QUEUE_SIZE)
return 0;
cmd_queue[cmd_queue_end] = cmd;
cmd_queue_end = (cmd_queue_end + 1) % CMD_QUEUE_SIZE;
Expand Down

0 comments on commit 9870aa5

Please sign in to comment.