mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Added an assert to catch init/quit call mismatch that might bite people.
This commit is contained in:
parent
e9d2133934
commit
a7b2db05cd
@ -65,6 +65,8 @@ static void
|
|||||||
SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
|
SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
|
||||||
{
|
{
|
||||||
int subsystem_index = SDL_MostSignificantBitIndex32(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) {
|
if (SDL_SubsystemRefCount[subsystem_index] > 0) {
|
||||||
--SDL_SubsystemRefCount[subsystem_index];
|
--SDL_SubsystemRefCount[subsystem_index];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user