From afa794d92abb2206f356e121794319e09490d002 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Wed, 10 Sep 2014 15:42:22 +0200 Subject: [PATCH] Fix #266 --- widget/chatareawidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/widget/chatareawidget.cpp b/widget/chatareawidget.cpp index 9f8633b97..bb3a2904d 100644 --- a/widget/chatareawidget.cpp +++ b/widget/chatareawidget.cpp @@ -77,7 +77,7 @@ QString ChatAreaWidget::getHtmledMessages() return res; } -void ChatAreaWidget::insertMessage(ChatAction *msgAction) +void ChatAreaWidget::insertMessage(ChatAction* msgAction) { if (msgAction == nullptr) return; @@ -88,6 +88,8 @@ void ChatAreaWidget::insertMessage(ChatAction *msgAction) moveCursor(QTextCursor::End); moveCursor(QTextCursor::PreviousCell); insertHtml(msgAction->getHtml()); + + delete msgAction; } void ChatAreaWidget::updateChatContent()