summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-09-27 16:59:46 +0200
committerGitHub <noreply@github.com>2022-09-27 16:59:46 +0200
commit0f6007b405fff82396885bacb8eed72abfba2da6 (patch)
treef808d5e8ca4c4502d83914a8028bd04d0bf81a9a
parentMerge pull request #8920 from abouvier/cmake-git (diff)
parentcore/loader: Return nullptr if file is nullptr (diff)
downloadyuzu-0f6007b405fff82396885bacb8eed72abfba2da6.tar
yuzu-0f6007b405fff82396885bacb8eed72abfba2da6.tar.gz
yuzu-0f6007b405fff82396885bacb8eed72abfba2da6.tar.bz2
yuzu-0f6007b405fff82396885bacb8eed72abfba2da6.tar.lz
yuzu-0f6007b405fff82396885bacb8eed72abfba2da6.tar.xz
yuzu-0f6007b405fff82396885bacb8eed72abfba2da6.tar.zst
yuzu-0f6007b405fff82396885bacb8eed72abfba2da6.zip
-rw-r--r--src/core/loader/loader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index 104d16efa..f24474ed8 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -244,6 +244,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(Core::System& system, FileSys::V
std::unique_ptr<AppLoader> GetLoader(Core::System& system, FileSys::VirtualFile file,
u64 program_id, std::size_t program_index) {
+ if (!file) {
+ return nullptr;
+ }
+
FileType type = IdentifyFile(file);
const FileType filename_type = GuessFromFilename(file->GetName());