File ChatMessagePart_return-if-view-is-nullptr.patch of Package kopete.17321

From d7c8d986d3c5e955749f14bb35e551ee86583639 Mon Sep 17 00:00:00 2001
From: Oleg Solovyov <mcpain@altlinux.org>
Date: Fri, 1 Oct 2021 16:19:45 +0300
Subject: [PATCH] ChatMessagePart: return if view() is nullptr

BUG: 436513
---
 kopete/chatwindow/chatmessagepart.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kopete/chatwindow/chatmessagepart.cpp b/kopete/chatwindow/chatmessagepart.cpp
index 65f5cfae6..b5ae5badf 100644
--- a/kopete/chatwindow/chatmessagepart.cpp
+++ b/kopete/chatwindow/chatmessagepart.cpp
@@ -1262,6 +1262,10 @@ void ChatMessagePart::changeStyle()
 #ifdef STYLE_TIMETEST
     QTime beforeChange = QTime::currentTime();
 #endif
+    if (!view()) {
+        return;
+    }
+
     // Make latestContact null to reset consecutives messages.
     d->latestContact = 0;
 
-- 
GitLab

openSUSE Build Service is sponsored by