Test recursive shutdown on global init bool

Test on this instead, it has to be unset anyways.
This commit is contained in:
Kawe Mazidjatari 2023-07-01 11:20:44 +02:00
parent d37f12aa4f
commit d7245a04e4

View File

@ -124,16 +124,15 @@ void SDK_Init()
void SDK_Shutdown()
{
static bool bShutDown = false;
assert(!bShutDown);
assert(g_bSdkInitialized);
if (bShutDown)
if (!g_bSdkInitialized)
{
spdlog::error("Recursive shutdown!\n");
return;
}
bShutDown = true;
g_bSdkInitialized = false;
spdlog::info("Shutdown GameSDK\n");
curl_global_cleanup();