src/events/SDL_events.c
branchgsoc2009_unit_tests
changeset 3726 ffe22900a50a
parent 3072 9da8f57ab92c
child 3268 82ce350be859
--- a/src/events/SDL_events.c	Sat Jul 11 18:54:03 2009 +0000
+++ b/src/events/SDL_events.c	Sat Jul 11 19:06:49 2009 +0000
@@ -196,7 +196,10 @@
         SDL_DestroyMutex(SDL_EventLock.lock);
     }
 #ifndef IPOD
-    SDL_DestroyMutex(SDL_EventQ.lock);
+    if (SDL_EventQ.lock) {
+        SDL_DestroyMutex(SDL_EventQ.lock);
+        SDL_EventQ.lock = NULL;
+    }
 #endif
 }