kern: implement SvcUnmapMemory, more of SvcGetInfo

This commit is contained in:
Michael Scire committed 2020-07-10 11:55:33 -07:00
1 parent faad5609b9
commit 1a0696f8a3
14 files changed
+231 -37

No files matched your search

@@ -147,7 +147,11 @@ namespace ams::kern {
if constexpr (std::is_same<T, KAutoObject>::value) {
return this->GetObjectImpl(handle);
} else {
return this->GetObjectImpl(handle)->DynamicCast<T*>();
if (auto *obj = this->GetObjectImpl(handle); obj != nullptr) {
return obj->DynamicCast<T*>();
} else {
return nullptr;
}
}
}
@@ -177,7 +181,11 @@ namespace ams::kern {
if constexpr (std::is_same<T, KAutoObject>::value) {
return obj;
} else {
return obj->DynamicCast<T*>();
if (auto *obj = this->GetObjectImpl(handle); obj != nullptr) {
return obj->DynamicCast<T*>();
} else {
return nullptr;
}
}
}