Do not leak partially constructed SDL_RWops objects
This commit is contained in:
parent
98c0443d9a
commit
c038918cd6
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ SDL_RWops* load_RWops(const std::string &path) {
|
|||
|
||||
std::istream *ifs = istream_file(path).release();
|
||||
if(!ifs) {
|
||||
SDL_FreeRW(rw);
|
||||
ERR_FS << "load_RWops: istream_file returned NULL on " << path << '\n';
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue