Fixed module initialisation failure bug

If a module initialisation failed, then it resources may or may not be
freed.
This is fixed.


Former-commit-id: 029e0844e392685a31b3afc02c5bf772e015a372
This commit is contained in:
Lynix
2012-12-25 01:56:49 +01:00
parent dc3cfa40ec
commit 1a4400facf
6 changed files with 37 additions and 10 deletions

View File

@@ -18,6 +18,8 @@ bool NzNoise::Initialize()
if (!NzCore::Initialize())
{
NazaraError("Failed to initialize core module");
Uninitialize();
return false;
}