[network/ruqola] src/widgets/room: Check mRoom value as for others actions
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 78e7f78d185903eb3925568d6a000c7bbec1e190 by Laurent Montel.
Committed on 13/08/2026 at 16:49.
Pushed by mlaurent into branch 'master'.
Check mRoom value as for others actions
M +2 -2 src/widgets/room/channelactionpopupmenu.cpp
https://invent.kde.org/network/ruqola/-/commit/78e7f78d185903eb3925568d6a000c7bbec1e190
diff --git a/src/widgets/room/channelactionpopupmenu.cpp b/src/widgets/room/channelactionpopupmenu.cpp
index 47a0b4e33d..ba02c5539f 100644
--- a/src/widgets/room/channelactionpopupmenu.cpp
+++ b/src/widgets/room/channelactionpopupmenu.cpp
@@ -200,10 +200,10 @@ void ChannelActionPopupMenu::slotUpdateMenu()
mExportMessages->setVisible(mCurrentRocketChatAccount->hasPermission(u"mail-messages"_s));
- mEncryptMessages->setVisible(mRoom->encryptedEnabled()
+ mEncryptMessages->setVisible(mRoom && mRoom->encryptedEnabled()
&& (mRoom->channelType() == Room::RoomType::Direct || mRoom->channelType() == Room::RoomType::Private)
&& mRoom->hasPermission(u"set-owner"_s));
- mEncryptMessages->setChecked(mRoom->encrypted());
+ mEncryptMessages->setChecked(mRoom && mRoom->encrypted());
const bool hasPermissionToBan = mRoom && mRoom->hasPermission(u"ban-user"_s)
&& (mRoom->channelType() == Room::RoomType::Channel || mRoom->channelType() == Room::RoomType::Private);