mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed a memory leak in the FileReader.
This commit is contained in:
parent
852c42bbd4
commit
4d72214fd5
1 changed files with 5 additions and 1 deletions
|
@ -348,7 +348,11 @@ public:
|
|||
bool FileReader::OpenFile(const char *filename, FileReader::Size start, FileReader::Size length)
|
||||
{
|
||||
auto reader = new StdFileReader;
|
||||
if (!reader->Open(filename, (long)start, (long)length)) return false;
|
||||
if (!reader->Open(filename, (long)start, (long)length))
|
||||
{
|
||||
delete reader;
|
||||
return false;
|
||||
}
|
||||
Close();
|
||||
mReader = reader;
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue