mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-08-09 08:59:32 +02:00
kern: fix KHandleTable null deref in ipc
This commit is contained in:
parent
b53ee81bab
commit
8cac1203be
@ -166,8 +166,10 @@ namespace ams::kern {
|
||||
KScopedSpinLock lk(this->lock);
|
||||
|
||||
KAutoObject *obj = this->GetObjectImpl(handle);
|
||||
if (obj->DynamicCast<KInterruptEvent *>() != nullptr) {
|
||||
return nullptr;
|
||||
if (AMS_LIKELY(obj != nullptr)) {
|
||||
if (AMS_UNLIKELY(obj->DynamicCast<KInterruptEvent *>() != nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
Loading…
Reference in New Issue
Block a user