From c64e15b9e57233049fe14f494af8b72a61b4e43e Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Wed, 28 Dec 2011 18:26:00 +0000 Subject: [PATCH] SDL_PollEvent may return -1. Handle this. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3713 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/libs/graphics/sdl/sdl_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc2/src/libs/graphics/sdl/sdl_common.c b/sc2/src/libs/graphics/sdl/sdl_common.c index 5316bd7e0..423fe0c47 100644 --- a/sc2/src/libs/graphics/sdl/sdl_common.c +++ b/sc2/src/libs/graphics/sdl/sdl_common.c @@ -186,7 +186,7 @@ TFB_ProcessEvents () { SDL_Event Event; - while (SDL_PollEvent (&Event)) + while (SDL_PollEvent (&Event) > 0) { /* Run through the InputEvent filter. */ ProcessInputEvent (&Event);