Correct a crash on a missing kernel object.

This commit is contained in:
Unknown W. Brackets 2020-07-22 23:59:09 -07:00 committed by GitHub
parent 9f88a8835d
commit de439f8cd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -468,7 +468,7 @@ public:
// see the Wrong type object error below, but we'll just have to live with that danger.
T* t = static_cast<T*>(pool[handle - handleOffset]);
if (t == nullptr || t->GetIDType() != T::GetStaticIDType()) {
WARN_LOG(SCEKERNEL, "Kernel: Wrong object type for %d (%08x), was %s, should have been %s", handle, handle, t->GetTypeName(), T::GetStaticTypeName());
WARN_LOG(SCEKERNEL, "Kernel: Wrong object type for %d (%08x), was %s, should have been %s", handle, handle, t ? t->GetTypeName() : "null", T::GetStaticTypeName());
outError = T::GetMissingErrorCode();
return 0;
}