From 73e1e929a2aecdb26b9db8ea9a418a3f4e9c1365 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 16 Oct 2018 11:36:55 -0400 Subject: XCI: Add function for checking the existence of the program NCA The only reason the getter existed was to check whether or not the program NCA was null. Instead, we can just provide a function to query for the existence of it, instead of exposing it entirely. --- src/core/loader/xci.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/loader') diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index 7a619acb4..461607c95 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp @@ -59,8 +59,7 @@ ResultStatus AppLoader_XCI::Load(Kernel::Process& process) { if (xci->GetProgramNCAStatus() != ResultStatus::Success) return xci->GetProgramNCAStatus(); - const auto nca = xci->GetProgramNCA(); - if (nca == nullptr && !Core::Crypto::KeyManager::KeyFileExists(false)) + if (!xci->HasProgramNCA() && !Core::Crypto::KeyManager::KeyFileExists(false)) return ResultStatus::ErrorMissingProductionKeyFile; const auto result = nca_loader->Load(process); -- cgit v1.2.3