Remove crash in plasmashell

Summary: remove bug in plasmashell Bug 405341

Test Plan: can't reproduce bug

Reviewers: dfaure, #frameworks, #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19698
This commit is contained in:
Laurent Montel 2019-03-12 07:03:10 +01:00
parent 017954185c
commit ebae2d6303

View File

@ -64,7 +64,10 @@ void SortFilterModel::syncRoleNames()
QHash<int,QByteArray> SortFilterModel::roleNames() const
{
return sourceModel()->roleNames();
if (sourceModel()) {
return sourceModel()->roleNames();
}
return {};
}
int SortFilterModel::roleNameToId(const QString &name) const