aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/xci.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-16 11:36:55 -0400
committerLioncash <mathew1800@gmail.com>2018-10-16 11:36:58 -0400
commit54ff822f6633a323a24826bf5dc7c9a4cdad18ae (patch)
tree56438cca62e87575958db23380e557143151675d /src/core/loader/xci.cpp
parent57e652436aec3511553f6b908feee03af4114bbd (diff)
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.
Diffstat (limited to 'src/core/loader/xci.cpp')
-rw-r--r--src/core/loader/xci.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index 7a619acb4e..461607c95a 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);