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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user