Don't try to change the icon of the "sort" action menu if it doesn't exist

BUG: 255819
FIXED-IN: 4.10.4
REVIEW: 109966
This commit is contained in:
Daniel Faust 2013-05-10 22:27:22 +02:00
parent 24609e78f8
commit f12345a57f

View file

@ -528,8 +528,10 @@ void DolphinViewActionHandler::slotSortRoleChanged(const QByteArray& role)
if (action) {
action->setChecked(true);
QAction* sortByMenu = m_actionCollection->action("sort");
sortByMenu->setIcon(KIcon(action->icon()));
if (!action->icon().isNull()) {
QAction* sortByMenu = m_actionCollection->action("sort");
sortByMenu->setIcon(KIcon(action->icon()));
}
}
}