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:
@@ -22,6 +22,8 @@ bool NzCore::Initialize(bool initializeHardwareInfo, bool initializeTaskSchedule
|
||||
if (initializeTaskScheduler && !NzTaskScheduler::Initialize())
|
||||
{
|
||||
NazaraError("Failed to initialize task scheduler");
|
||||
Uninitialize();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user