COMMON: Fix _disposeFileHandle not being set
If there is a file handle, the clear() method checks if it should be disposed of. However, the _disposeFileHandle variable was never set, so it's unlikely that _exe was ever deleted. I found this out from a Valgrind warning when quitting Buried in Time. This seems like a very obvious fix to me, and as such it seems like a good candidate for backporting to the release branch. On the other hand, maybe there are cases where it worked by sheer, dumb luck? I'm not familiar enough with where and how it is used.
This commit is contained in:
parent
bebded6d3c
commit
92a2519846
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ bool NEResources::loadFromEXE(SeekableReadStream *stream, DisposeAfterUse::Flag
|
|||
return false;
|
||||
|
||||
_exe = stream;
|
||||
_disposeFileHandle = disposeFileHandle;
|
||||
|
||||
uint32 offsetResourceTable = getResourceTableOffset();
|
||||
if (offsetResourceTable == 0xFFFFFFFF)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue