Make SendSyncRequest warn instead of panic on invalid handles

Some games like Arc Baseball use invalid handles...
This commit is contained in:
wheremyfoodat 2023-08-20 18:03:42 +03:00 committed by GitHub
parent 2669f80db7
commit cce796ec0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,7 @@ void Kernel::sendSyncRequest() {
// If we're actually communicating with a port
const auto session = getObject(handle, KernelObjectType::Session);
if (session == nullptr) [[unlikely]] {
Helpers::panic("SendSyncRequest: Invalid handle");
Helpers::warn("SendSyncRequest: Invalid handle");
regs[0] = Result::Kernel::InvalidHandle;
return;
}
@ -127,4 +127,4 @@ void Kernel::sendSyncRequest() {
const auto portData = objects[portHandle].getData<Port>();
Helpers::panic("SendSyncRequest targetting port %s\n", portData->name);
}
}
}