From 765c782355cc2795bf479ec5ebee37cca3253104 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 5 Mar 2023 22:23:46 -0600 Subject: [PATCH] fix(util): pass nullptr when SFile::OpenEx fails --- src/util/SFile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/SFile.cpp b/src/util/SFile.cpp index 91e5e98..9aafa45 100644 --- a/src/util/SFile.cpp +++ b/src/util/SFile.cpp @@ -90,6 +90,7 @@ int32_t SFile::OpenEx(SArchive* archive, const char* filename, uint32_t flags, S std::ifstream* stream = new std::ifstream(path, std::ios::in | std::ios::binary | std::ios::ate); if (!stream->is_open()) { + *file = nullptr; return 0; }