summaryrefslogtreecommitdiff
blob: 844ddf6a234da19996a09ecaea1ae3756fde095d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From ebae2d63033647950cf0f9d97410723a8c7db1f3 Mon Sep 17 00:00:00 2001
From: Laurent Montel <montel@kde.org>
Date: Tue, 12 Mar 2019 07:03:10 +0100
Subject: 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
---
 src/declarativeimports/core/datamodel.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/declarativeimports/core/datamodel.cpp b/src/declarativeimports/core/datamodel.cpp
index 50dc6c5..03bea20 100644
--- a/src/declarativeimports/core/datamodel.cpp
+++ b/src/declarativeimports/core/datamodel.cpp
@@ -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
-- 
cgit v1.1