src/events/SDL_events.c
changeset 7077 f8e3dcefed59
parent 7037 3fedf1f25b94
child 7082 e9d6004d2978
--- a/src/events/SDL_events.c	Tue Apr 16 01:38:08 2013 -0400
+++ b/src/events/SDL_events.c	Fri Apr 19 11:58:38 2013 -0400
@@ -123,12 +123,6 @@
        FIXME: Does this introduce any other bugs with events at startup?
      */
 
-    /* No filter to start with, process most event types */
-    SDL_EventOK = NULL;
-    SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
-    SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
-    SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
-
     /* Create the lock and set ourselves active */
 #if !SDL_THREADS_DISABLED
     if (!SDL_EventQ.lock) {
@@ -138,6 +132,13 @@
         return (-1);
     }
 #endif /* !SDL_THREADS_DISABLED */
+
+    /* No filter to start with, process most event types */
+    SDL_EventOK = NULL;
+    SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
+    SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
+    SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
+
     SDL_EventQ.active = 1;
 
     return (0);