mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-18 17:11:23 +00:00
kern: fix KHandleTable null deref in ipc
This commit is contained in:
parent
4ae74b9b4e
commit
4804e1e1e0
@ -166,8 +166,10 @@ namespace ams::kern {
|
|||||||
KScopedSpinLock lk(this->lock);
|
KScopedSpinLock lk(this->lock);
|
||||||
|
|
||||||
KAutoObject *obj = this->GetObjectImpl(handle);
|
KAutoObject *obj = this->GetObjectImpl(handle);
|
||||||
if (obj->DynamicCast<KInterruptEvent *>() != nullptr) {
|
if (AMS_LIKELY(obj != nullptr)) {
|
||||||
return nullptr;
|
if (AMS_UNLIKELY(obj->DynamicCast<KInterruptEvent *>() != nullptr)) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
|
Loading…
Reference in New Issue
Block a user