[Scummvm-cvs-logs] SF.net SVN: scummvm:[39033] scummvm/trunk/engines/sci/sfx/mixer.cpp
wjpalenstijn at users.sourceforge.net
wjpalenstijn at users.sourceforge.net
Sun Mar 1 13:08:44 CET 2009
Revision: 39033
http://scummvm.svn.sourceforge.net/scummvm/?rev=39033&view=rev
Author: wjpalenstijn
Date: 2009-03-01 12:08:44 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Don't free a sfx_pcm_feed_t that's still in use.
It's a rather hackish fix, but this feed-wrapping code should only be
temporary anyway.
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/mixer.cpp
Modified: scummvm/trunk/engines/sci/sfx/mixer.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer.cpp 2009-03-01 12:00:44 UTC (rev 39032)
+++ scummvm/trunk/engines/sci/sfx/mixer.cpp 2009-03-01 12:08:44 UTC (rev 39033)
@@ -190,7 +190,8 @@
}
PCMFeedState::~PCMFeedState() {
- feed->destroy(feed);
+ if (feed)
+ feed->destroy(feed);
free(buf);
}
@@ -231,6 +232,12 @@
P->_feeds.push_back(fs);
+ // HACK: the copy of fs made in P->_feeds is a shallow copy,
+ // so we need to prevent fs.buf and fs.feed from being destroyed when
+ // fs goes out of scope
+ fs.buf = 0;
+ fs.feed = 0;
+
RELEASE_LOCK();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list