src/events/SDL_events.c
changeset 7611 ed6f4b8557e4
parent 7306 1516fe08e6ec
child 7719 31b5f9ff36ca
child 8477 ad08f0d710f3
     1.1 --- a/src/events/SDL_events.c	Thu Aug 08 13:29:44 2013 -0700
     1.2 +++ b/src/events/SDL_events.c	Thu Aug 08 15:04:30 2013 -0700
     1.3 @@ -599,7 +599,7 @@
     1.4  {
     1.5      Uint32 event_base;
     1.6  
     1.7 -    if (SDL_userevents+numevents <= SDL_LASTEVENT) {
     1.8 +    if ((numevents > 0) && (SDL_userevents+numevents <= SDL_LASTEVENT)) {
     1.9          event_base = SDL_userevents;
    1.10          SDL_userevents += numevents;
    1.11      } else {