Assign XModule path on load rather than in the constructor

This commit is contained in:
Dr. Chat
2015-12-28 13:25:04 -06:00
committed by Ben Vanik
parent c242a01043
commit 4e7dfa477b
6 changed files with 17 additions and 13 deletions

View File

@@ -342,7 +342,7 @@ object_ref<UserModule> KernelState::LoadUserModule(const char* raw_name,
global_lock.unlock();
// Module wasn't loaded, so load it.
module = object_ref<UserModule>(new UserModule(this, path.c_str()));
module = object_ref<UserModule>(new UserModule(this));
X_STATUS status = module->LoadFromFile(path);
if (XFAILED(status)) {
object_table()->RemoveHandle(module->handle());