[Scummvm-git-logs] scummvm master -> 450bd74fad476de68bc4919b06386fdde831dfc3

sev- noreply at scummvm.org
Thu Jun 8 14:08:52 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
450bd74fad DIRECTOR: Attempt to fix memory leaks on unsuccessful projector open attempts


Commit: 450bd74fad476de68bc4919b06386fdde831dfc3
    https://github.com/scummvm/scummvm/commit/450bd74fad476de68bc4919b06386fdde831dfc3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-06-08T16:08:09+02:00

Commit Message:
DIRECTOR: Attempt to fix memory leaks on unsuccessful projector open attempts

Changed paths:
    engines/director/archive.cpp


diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 81f5262b8df..5e6d49fe406 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -387,6 +387,8 @@ bool RIFFArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
 
 	stream->seek(startOffset);
 
+	_stream = stream;
+
 	if (convertTagToUppercase(stream->readUint32BE()) != MKTAG('R', 'I', 'F', 'F')) {
 		debugC(5, kDebugLoading, "RIFFArchive::openStream(): RIFF expected but not found");
 		return false;
@@ -410,8 +412,6 @@ bool RIFFArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
 
 	Common::DumpFile out;
 
-	_stream = stream;
-
 	while ((uint32)stream->pos() < startPos + cftcSize) {
 		uint32 tag = convertTagToUppercase(stream->readUint32BE());
 




More information about the Scummvm-git-logs mailing list