Do not leak partially constructed SDL_RWops objects

This commit is contained in:
Alexander van Gessel 2017-09-15 16:21:06 +02:00
parent 98c0443d9a
commit c038918cd6

View file

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