Commit 73aa7b32 authored by Andreas Hartmetz's avatar Andreas Hartmetz
Browse files

Fix crash due to uninitialized QTimer

Canberra only needs to be initialized once, but the QTimer needs to
be instantiated in every instance of Mixer_ALSA.
parent c8c3e50f
......@@ -88,12 +88,11 @@ Mixer_ALSA::Mixer_ALSA( Mixer* mixer, int device ) : Mixer_Backend(mixer, devic
ca_context_set_driver(s_ccontext, "alsa");
qCDebug(KMIX_LOG) << "Initialised Canberra context for volume feedback";
m_playFeedbackTimer = new QTimer(this);
m_playFeedbackTimer->setSingleShot(true);
m_playFeedbackTimer->setInterval(100);
m_playFeedbackTimer->callOnTimeout(this, &Mixer_ALSA::playFeedbackSound);
}
m_playFeedbackTimer = new QTimer(this);
m_playFeedbackTimer->setSingleShot(true);
m_playFeedbackTimer->setInterval(100);
m_playFeedbackTimer->callOnTimeout(this, &Mixer_ALSA::playFeedbackSound);
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment