src/SDL.c
changeset 7810 ab1b92bf0327
parent 7592 063a932a264f
child 7828 1451063c8ecd
--- a/src/SDL.c	Sun Oct 13 17:15:43 2013 -0300
+++ b/src/SDL.c	Sun Oct 13 19:48:45 2013 -0700
@@ -65,6 +65,8 @@
 SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
 {
     int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
+    /* If this assert triggers there is a mismatch between init and quit calls */
+    SDL_assert(SDL_SubsystemRefCount[subsystem_index] > 0);
     if (SDL_SubsystemRefCount[subsystem_index] > 0) {
         --SDL_SubsystemRefCount[subsystem_index];
     }