From c95057283e3c3d6c05a178b1f24cdeda6ae8eea2 Mon Sep 17 00:00:00 2001 From: sudden6 Date: Sat, 28 Aug 2021 00:26:45 +0200 Subject: [PATCH] fix: correctly destroy on group remove --- src/widget/widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index a0984f8b2..c35853ed3 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -2070,12 +2070,13 @@ void Widget::removeGroup(Group* g, bool fake) return; } groupChatForms.erase(groupChatFormIt); + groupAlertConnections.remove(groupId); + delete g; if (contentLayout && contentLayout->mainHead->layout()->isEmpty()) { onAddClicked(); } - groupAlertConnections.remove(groupId); } void Widget::removeGroup(const GroupId& groupId)