From ce5b1e52d34d7010c540cacb7fbf3b20fb9d20f6 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 2 Oct 2018 19:27:36 +1300 Subject: [PATCH] fix crash when loading card properties --- trayicon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trayicon.cpp b/trayicon.cpp index 5d9eec0..a6d1ebd 100644 --- a/trayicon.cpp +++ b/trayicon.cpp @@ -31,7 +31,9 @@ TrayIcon::TrayIcon(QObject *parent) : refreshData(); } }); - connect(&this->pulse, &QPulse::GotCardInfoList, this, &TrayIcon::onGotPulseCardInfo); + + // Need to use BlockingQueuedConnection to pull items off pulseaudio thread before it reallocates them + connect(&this->pulse, &QPulse::GotCardInfoList, this, &TrayIcon::onGotPulseCardInfo, Qt::BlockingQueuedConnection); refreshData(); }