Skip to content
Permalink
Browse files

Added an assert to catch init/quit call mismatch that might bite people.

  • Loading branch information
slouken committed Oct 14, 2013
1 parent e9d2133 commit a7b2db05cd77c91268b377a810450dc4b5976473

File 1 of 1 in a7b2db0

@@ -65,6 +65,8 @@ static void
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];
}

0 comments on commit a7b2db0

Please sign in to comment.