@@ -382,10 +382,6 @@ Showable {
382382 }
383383
384384 onShowMessage: {
385− if (!lightDM.greeter.active) {
386− return; // could happen if hideGreeter() comes in before we prompt
387− }
388−
389385 // inefficient, but we only rarely deal with messages
390386 var html = text.replace(/&/g, "&")
391387 .replace(/</g, "<")
@@ -395,20 +391,17 @@ Showable {
395391 html = "<font color=\"#df382c\">" + html + "</font>";
396392 }
397393
398− loader.item.showMessage(html);
394+ if (loader.item) {
395+ loader.item.showMessage(html);
396+ }
399397 }
400398
401399 onShowPrompt: {
402400 d.waiting = false;
403401
404− // Check root.required as well -- even though it's directly used to
405− // determine greeter.active -- because this callback can be made
406− // after required=true, but before greeter.active gets updated.
407− if (!LightDMService.greeter.active && !root.required) {
408− return; // could happen if hideGreeter() comes in before we prompt
402+ if (loader.item) {
403+ loader.item.showPrompt(text, isSecret, isDefaultPrompt);
409404 }
410−
411− loader.item.showPrompt(text, isSecret, isDefaultPrompt);
412405 }
413406
414407 onAuthenticationComplete: {