kern: update port/session state semantics

This commit is contained in:
Michael Scire 2021-04-07 14:45:38 -07:00 committed by SciresM
parent c62a7381f8
commit cbdf33260e
7 changed files with 32 additions and 11 deletions

View file

@ -47,6 +47,9 @@ namespace ams::kern {
Derived *derived = obj->DynamicCast<Derived *>();
R_UNLESS(derived != nullptr, svc::ResultNotFound());
/* Check that the object is closed. */
R_UNLESS(derived->IsServerClosed(), svc::ResultInvalidState());
return Delete(obj.GetPointerUnsafe(), name);
}