kern: fix GetProcessId wrong result on invalid parameter

This commit is contained in:
Michael Scire 2022-12-04 13:40:44 -07:00
parent ff7a80e592
commit 1f8798ace7

View file

@ -63,6 +63,8 @@ namespace ams::kern::svc {
/* Get the process id. */ /* Get the process id. */
*out_process_id = d->GetProcessUnsafe()->GetProcessId(); *out_process_id = d->GetProcessUnsafe()->GetProcessId();
} else {
R_THROW(svc::ResultInvalidHandle());
} }
R_SUCCEED(); R_SUCCEED();