Avoid calling OnUnload twice.
This commit is contained in:
parent
0388d17a72
commit
b2241e3fef
|
@ -112,12 +112,17 @@ X_STATUS XUserModule::LoadFromMemory(const void* addr, const size_t length) {
|
||||||
}
|
}
|
||||||
|
|
||||||
X_STATUS XUserModule::Unload() {
|
X_STATUS XUserModule::Unload() {
|
||||||
if (!xex_module()->Unload()) {
|
if (!xex_module()->loaded()) {
|
||||||
return X_STATUS_UNSUCCESSFUL;
|
// Quick abort.
|
||||||
|
return X_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
OnUnload();
|
if (xex_module()->Unload()) {
|
||||||
return X_STATUS_SUCCESS;
|
OnUnload();
|
||||||
|
return X_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return X_STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t XUserModule::GetProcAddressByOrdinal(uint16_t ordinal) {
|
uint32_t XUserModule::GetProcAddressByOrdinal(uint16_t ordinal) {
|
||||||
|
|
Loading…
Reference in New Issue