mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-11-27 08:03:34 +03:00
fix(util): pass nullptr when SFile::OpenEx fails
This commit is contained in:
1 file changed
+1
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user