mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-13 12:55:58 +03:00
fix(util): pass nullptr when SFile::OpenEx fails
This commit is contained in:
parent
f6d768ac59
commit
765c782355
@ -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);
|
std::ifstream* stream = new std::ifstream(path, std::ios::in | std::ios::binary | std::ios::ate);
|
||||||
|
|
||||||
if (!stream->is_open()) {
|
if (!stream->is_open()) {
|
||||||
|
*file = nullptr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user