on xenial help sign in
Guard some uses of loader.item to avoid early-exiting an important function
commit3b8e2299977d7223cc327c7deea0f74e897afead authorMichael Terry <michael.terry@canonical.com> dateMon 27 Apr 2015, 09:52 (11 years ago) parent3e3867c
1 file changed+4−2
qml/Greeter/Greeter.qml+4−2
qml/Greeter/Greeter.qml+4−2
@@ -141,8 +141,10 @@ Showable {
141141 enabled = false;
142142 if (LightDM.Greeter.startSessionSync()) {
143143 sessionStarted();
144− loader.item.notifyAuthenticationSucceeded();
145− } else {
144+ if (loader.item) {
145+ loader.item.notifyAuthenticationSucceeded();
146+ }
147+ } else if (loader.item) {
146148 loader.item.notifyAuthenticationFailed();
147149 }
148150 enabled = true;