From 5ea644d220dc47821d47d978f3b521b5b4d17b29 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 7 Sep 2023 14:28:47 +0800 Subject: [PATCH] Fix macOS notification talk replies by avoiding early dealloc Signed-off-by: Claudio Cambra --- src/gui/systray.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/systray.mm b/src/gui/systray.mm index 505d18ec9955a..707e3269fd429 100644 --- a/src/gui/systray.mm +++ b/src/gui/systray.mm @@ -58,8 +58,8 @@ void sendTalkReply(UNNotificationResponse *response, UNNotificationContent* cont << "Token:" << qToken << "Account:" << qAccount; - const auto talkReply = QSharedPointer::create( - accountState.data(), OCC::Systray::instance()); + // OCC::TalkReply deletes itself once it's done, fire and forget + const auto talkReply = new OCC::TalkReply(accountState.data(), OCC::Systray::instance()); talkReply->sendReplyMessage(qToken, qReply, qReplyTo); }