[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, CopyToMoveToService,
ContextMenuSettings::showCopyMoveMenu()); ContextMenuSettings::showCopyMoveMenu());
// Add other built-in actions if (m_actions){
for (const QString& id : m_actionIds) { // Add other built-in actions
const QAction* action = m_actions->action(id); for (const QString& id : m_actionIds) {
if (action) { const QAction* action = m_actions->action(id);
addRow(action->icon().name(), action->text(), id, entryVisible(id)); if (action) {
addRow(action->icon().name(), action->text(), id, entryVisible(id));
}
} }
} }