diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-09 12:34:40 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-10 17:01:40 +0000 |
commit | 7b2178768f9ff50354f343838f2f916d87e0167c (patch) | |
tree | ea1a0a1ab2c030b042e47467e77025eb32752b49 | |
parent | f839f9e3eb2cd89f2b458349a08f9e5444744f1b (diff) | |
download | qtmultimedia-7b2178768f9ff50354f343838f2f916d87e0167c.tar.gz |
Free d in QAudioBuffer &QAudioBuffer::operator =(const QAudioBuffer &).
Task-number: QTBUG-40571
Change-Id: Idc2dcc7d254873edda653b9c9eb8d88cbb91d4f6
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
-rw-r--r-- | src/multimedia/audio/qaudiobuffer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudiobuffer.cpp b/src/multimedia/audio/qaudiobuffer.cpp index 8b4597b53..87517b5e2 100644 --- a/src/multimedia/audio/qaudiobuffer.cpp +++ b/src/multimedia/audio/qaudiobuffer.cpp @@ -264,6 +264,8 @@ QAudioBuffer::QAudioBuffer(int numFrames, const QAudioFormat &format, qint64 sta QAudioBuffer &QAudioBuffer::operator =(const QAudioBuffer &other) { if (this->d != other.d) { + if (d) + d->deref(); d = QAudioBufferPrivate::acquire(other.d); } return *this; |