diff --git a/src/mumble/widgets/TrayIcon.cpp b/src/mumble/widgets/TrayIcon.cpp index fe49ce9f9c..750520659b 100644 --- a/src/mumble/widgets/TrayIcon.cpp +++ b/src/mumble/widgets/TrayIcon.cpp @@ -59,8 +59,10 @@ TrayIcon::TrayIcon() : QSystemTrayIcon(Global::get().mw), m_statusIcon(Global::g show(); } +#include + void TrayIcon::on_icon_update() { - std::reference_wrapper< QIcon > newIcon = Global::get().mw->qiIcon; + QIcon &newIcon; const ClientUser *p = ClientUser::get(Global::get().uiSession); @@ -92,9 +94,14 @@ void TrayIcon::on_icon_update() { newIcon = Global::get().mw->qiTalkingOff; break; } + } else { + // Fallback generic Mumble icon + newIcon = Global::get().mw->qiIcon; } - if (&newIcon.get() != &m_statusIcon.get()) { + qDebug() << "newIcon addr " << &newIcon << " m_statusIcon addr " << &m_statusIcon.get(); + + if (&newIcon != &m_statusIcon.get()) { m_statusIcon = newIcon; applyIcon(m_statusIcon); }