fix(util): pass nullptr when SFile::OpenEx fails

This commit is contained in:
fallenoak 2023-03-05 22:23:46 -06:00
parent f6d768ac59
commit 765c782355
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -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;
}