summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qsoundeffect_pulse_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qsoundeffect_pulse_p.cpp')
-rw-r--r--src/multimedia/audio/qsoundeffect_pulse_p.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
index a86f22872..981d4c01f 100644
--- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp
+++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
@@ -369,7 +369,8 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
pulseDaemon()->ref();
m_ref = new QSoundEffectRef(this);
- pa_sample_spec_init(&m_pulseSpec);
+ if (pulseDaemon()->context())
+ pa_sample_spec_init(&m_pulseSpec);
m_resources = QMediaResourcePolicy::createResourceSet<QMediaPlayerResourceSetInterface>();
Q_ASSERT(m_resources);