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:
@@ -466,7 +466,13 @@ bool NzRenderer::Initialize(bool initializeDebugDrawer)
|
||||
if (initializeDebugDrawer && !NzDebugDrawer::Initialize())
|
||||
NazaraWarning("Failed to initialize debug drawer"); // Non-critique
|
||||
|
||||
NzTextureSampler::Initialize();
|
||||
if (!NzTextureSampler::Initialize())
|
||||
{
|
||||
NazaraError("Failed to initialize texture sampler");
|
||||
Uninitialize();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Loaders
|
||||
NzLoaders_Texture_Register();
|
||||
|
||||
Reference in New Issue
Block a user