src/SDL.c
changeset 7810 ab1b92bf0327
parent 7592 063a932a264f
child 7828 1451063c8ecd
equal deleted inserted replaced
7809:fd53b2b2a205 7810:ab1b92bf0327
    63 /* Private helper to decrement a subsystem's ref counter. */
    63 /* Private helper to decrement a subsystem's ref counter. */
    64 static void
    64 static void
    65 SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
    65 SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
    66 {
    66 {
    67     int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
    67     int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
       
    68     /* If this assert triggers there is a mismatch between init and quit calls */
       
    69     SDL_assert(SDL_SubsystemRefCount[subsystem_index] > 0);
    68     if (SDL_SubsystemRefCount[subsystem_index] > 0) {
    70     if (SDL_SubsystemRefCount[subsystem_index] > 0) {
    69         --SDL_SubsystemRefCount[subsystem_index];
    71         --SDL_SubsystemRefCount[subsystem_index];
    70     }
    72     }
    71 }
    73 }
    72 
    74