mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
fix(util): pass nullptr when SFile::OpenEx fails
This commit is contained in:
parent
f6d768ac59
commit
765c782355
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue