Merge pull request #222 from wheremyfoodat/wheremyfoodat-patch-4
Make SendSyncRequest warn instead of panic on invalid handles
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user