1 files changed, 2 insertions, 1 deletions
diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp
index d9d157fc..36692d03 100644
--- a/src/notifications/ManagerLinux.cpp
+++ b/src/notifications/ManagerLinux.cpp
@@ -84,7 +84,7 @@ NotificationsManager::postNotification(const QString &roomid,
else
notificationIds[watcher->reply().arguments().first().toUInt()] =
roomEventId{roomid, eventid};
- delete watcher;
+ watcher->deleteLater();
});
}
@@ -103,6 +103,7 @@ NotificationsManager::closeNotification(uint id)
if (watcher->reply().type() == QDBusMessage::ErrorMessage) {
qDebug() << "D-Bus Error:" << watcher->reply().errorMessage();
};
+ watcher->deleteLater();
});
}
|