Merge lp:~phablet-team/messaging-app/fix-crash-callback into lp:messaging-app/staging

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 663
Merged at revision: 663
Proposed branch: lp:~phablet-team/messaging-app/fix-crash-callback
Merge into: lp:messaging-app/staging
Diff against target: 12 lines (+1/-1)
1 file modified
src/qml/MainPage.qml (+1/-1)
To merge this branch: bzr merge lp:~phablet-team/messaging-app/fix-crash-callback
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+321107@code.launchpad.net

Commit message

Check if "callback" is undefined to avoid crashing the app

Description of the change

Check if "callback" is undefined to avoid crashing the app

To post a comment you must log in.
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/MainPage.qml'
2--- src/qml/MainPage.qml 2017-03-15 18:09:35 +0000
3+++ src/qml/MainPage.qml 2017-03-27 19:13:08 +0000
4@@ -368,7 +368,7 @@
5 incubator = component.incubateObject(parent, properties, Qt.Asynchronous);
6
7 function objectCreated(status) {
8- if (status == Component.Ready && callback != null) {
9+ if (status == Component.Ready && callback != undefined && callback != null) {
10 callback(incubator.object);
11 }
12 }

Subscribers

People subscribed via source and target branches

to all changes: