Updated the way module are initialized
It's safer and prevent a bug when initialisation fails Former-commit-id: a04f18e18f2d9db11ec595a9b8096c2792b39641
This commit is contained in:
@@ -12,11 +12,15 @@
|
||||
|
||||
bool NzCore::Initialize()
|
||||
{
|
||||
if (s_moduleReferenceCounter++ != 0)
|
||||
if (s_moduleReferenceCounter > 0)
|
||||
{
|
||||
s_moduleReferenceCounter++;
|
||||
return true; // Déjà initialisé
|
||||
}
|
||||
|
||||
s_moduleReferenceCounter++;
|
||||
|
||||
NazaraNotice("Initialized: Core");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user