[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,11 +229,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));
}
}
}