]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[src/settings/contextmenu/contextmenusettingspage] Fix Crash because of nullptr
authorÖmer Fadıl Usta <omerusta@gmail.com>
Tue, 25 May 2021 01:49:20 +0000 (01:49 +0000)
committerÖmer Fadıl Usta <omerusta@gmail.com>
Tue, 25 May 2021 01:49:20 +0000 (01:49 +0000)
BUG: 437539

src/settings/contextmenu/contextmenusettingspage.cpp

index 34934bb877b7ed90349a8eb4c5f2e436c3214df8..c92bad43e61b70cc7925c9a8fd928f5b9135c3b6 100644 (file)
@@ -235,11 +235,13 @@ void ContextMenuSettingsPage::showEvent(QShowEvent* event)
                CopyToMoveToService,
                ContextMenuSettings::showCopyMoveMenu());
 
-        // Add other built-in actions
-        for (const QString& id : m_actionIds) {
-            const QAction* action = m_actions->action(id);
-            if (action) {
-                addRow(action->icon().name(), action->text(), id, entryVisible(id));
+        if (m_actions){
+            // Add other built-in actions
+            for (const QString& id : m_actionIds) {
+                const QAction* action = m_actions->action(id);
+                if (action) {
+                    addRow(action->icon().name(), action->text(), id, entryVisible(id));
+                }
             }
         }