Null check modules on loadexec.

Should fix #6552.
This commit is contained in:
Unknown W. Brackets 2014-07-14 22:14:23 -07:00
parent c4bebda182
commit 2da02f97c8

View File

@ -1479,7 +1479,9 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
u32 error;
while (!loadedModules.empty()) {
Module *module = kernelObjects.Get<Module>(*loadedModules.begin(), error);
module->Cleanup();
if (module) {
module->Cleanup();
}
}
Replacement_Shutdown();