Fixed calling Uninitialize when not Initialized
Former-commit-id: 1d0bb01f881be76e163a5ac27c91d7fb6a873bb7
This commit is contained in:
@@ -29,10 +29,18 @@ bool NzCore::IsInitialized()
|
||||
|
||||
void NzCore::Uninitialize()
|
||||
{
|
||||
if (--s_moduleReferenceCounter != 0)
|
||||
return; // Encore utilisé
|
||||
if (s_moduleReferenceCounter != 1)
|
||||
{
|
||||
// Le module est soit encore utilisé, soit pas initialisé
|
||||
if (s_moduleReferenceCounter > 1)
|
||||
s_moduleReferenceCounter--;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Libération du module
|
||||
s_moduleReferenceCounter = 0;
|
||||
|
||||
NazaraNotice("Uninitialized: Core");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user