src/events/SDL_mouse.c
changeset 2727 76c2fc9696ea
parent 2725 6ce6d56b63bf
child 2765 f55c87ae336b
--- a/src/events/SDL_mouse.c	Tue Aug 26 06:03:48 2008 +0000
+++ b/src/events/SDL_mouse.c	Tue Aug 26 07:34:23 2008 +0000
@@ -374,6 +374,11 @@
     int index = SDL_GetMouseIndexId(id);
     SDL_Mouse *mouse = SDL_GetMouse(index);
     int posted = 0;
+
+    if (!mouse) {
+        return 0;
+    }
+
     last_x = x;
     last_y = y;
     if (SDL_ProcessEvents[type] == SDL_ENABLE) {