summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/multimedia/audio/qsoundeffect_pulse_p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
index a1010fa46..3546c86b2 100644
--- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp
+++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
@@ -838,7 +838,9 @@ void QSoundEffectPrivate::playSample()
#endif
Q_ASSERT(m_pulseStream);
Q_ASSERT(pa_stream_get_state(m_pulseStream) == PA_STREAM_READY);
- pa_operation_unref(pa_stream_cork(m_pulseStream, 0, 0, 0));
+ pa_operation *o = pa_stream_cork(m_pulseStream, 0, 0, 0);
+ if (o)
+ pa_operation_unref(o);
}
void QSoundEffectPrivate::stop()