Merge lp:~zsombi/ubuntu-ui-toolkit/stylingCrash into lp:~bzoltan/ubuntu-ui-toolkit/OTA10-landing-2016-01-20

Proposed by Zsombor Egri
Status: Merged
Merged at revision: 1854
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/stylingCrash
Merge into: lp:~bzoltan/ubuntu-ui-toolkit/OTA10-landing-2016-01-20
Diff against target: 17 lines (+5/-2)
1 file modified
src/Ubuntu/Components/plugin/uctheme.cpp (+5/-2)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/stylingCrash
Reviewer Review Type Date Requested Status
Zoltan Balogh Pending
Review via email: mp+288307@code.launchpad.net

Commit message

Fix a crash in unity8 welcome screen loading when a style to be loaded on an item has no QML engine attached yet.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/plugin/uctheme.cpp'
2--- src/Ubuntu/Components/plugin/uctheme.cpp 2016-02-25 17:45:27 +0000
3+++ src/Ubuntu/Components/plugin/uctheme.cpp 2016-03-07 15:52:02 +0000
4@@ -696,8 +696,11 @@
5
6 if (parent != NULL) {
7 QQmlEngine* engine = qmlEngine(parent);
8- Q_ASSERT(engine);
9- Q_ASSERT(engine == qmlEngine(this));
10+ if (!engine) {
11+ // we may be in the phase when the qml context is not yet defined for the parent
12+ // so for now we return NULL
13+ return Q_NULLPTR;
14+ }
15 // make sure we have the paths
16 bool fallback = false;
17 QUrl url = styleUrl(styleName, version, &fallback);

Subscribers

People subscribed via source and target branches

to all changes: