[src/settings/contextmenu/contextmenusettingspage] Fix Crash because of nullptr

BUG: 437539

(cherry picked from commit 879fa9fa7d)
This commit is contained in:
Ömer Fadıl Usta 2021-05-25 01:49:20 +00:00 committed by Nate Graham
parent 536d9129a4
commit b5e276d115

View file

@ -229,6 +229,7 @@ void ContextMenuSettingsPage::showEvent(QShowEvent* event)
CopyToMoveToService,
ContextMenuSettings::showCopyMoveMenu());
if (m_actions){
// Add other built-in actions
for (const QString& id : m_actionIds) {
const QAction* action = m_actions->action(id);
@ -236,6 +237,7 @@ void ContextMenuSettingsPage::showEvent(QShowEvent* event)
addRow(action->icon().name(), action->text(), id, entryVisible(id));
}
}
}
m_sortModel->sort(Qt::DisplayRole);