[network/ruqola] src/core/model: Fix crash

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit caea52a501a5b5a1624fa91379a09c4e91fd3311 by Laurent Montel.
Committed on 06/08/2026 at 07:10.
Pushed by mlaurent into branch 'master'.

Fix crash

M  +6    -4    src/core/model/messagesmodel.cpp

https://invent.kde.org/network/ruqola/-/commit/caea52a501a5b5a1624fa91379a09c4e91fd3311

diff --git a/src/core/model/messagesmodel.cpp b/src/core/model/messagesmodel.cpp
index e91b6624c3..be15fbc383 100644
--- a/src/core/model/messagesmodel.cpp
+++ b/src/core/model/messagesmodel.cpp
@@ -452,10 +452,12 @@ QString MessagesModel::convertedText(const Message &message, const QString &sear
     if (message.messageType() == Message::System) {
         return message.systemMessageText();
     } else if (message.messageType() == Message::EncryptedText) {
-        const QString text = message.messageEncrypted()->descriptedText();
-        qDebug() << " text " << text;
-        if (!text.isEmpty()) {
-            return text;
+        if (message.messageEncrypted()) {
+            const QString text = message.messageEncrypted()->descriptedText();
+            qDebug() << " text " << text;
+            if (!text.isEmpty()) {
+                return text;
+            }
         }
         return message.systemMessageText();
     } else {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.