From 975ca2e56a5f8b31591c73b59a903e22e20fafe0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 27 Jul 2015 09:14:06 -0700 Subject: QML UI: prevent crash when trying to set message without window If we try to set up a message before the window has been instantiated we should ignore the message, not crash. Signed-off-by: Dirk Hohndel --- qt-mobile/qmlmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-mobile') diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 3e09be7c3..7cd58449a 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -11,7 +11,7 @@ static void showMessage(const char *errorString) { - if (!qqWindowObject->setProperty("messageText", QVariant(errorString))) + if (qqWindowObject && !qqWindowObject->setProperty("messageText", QVariant(errorString))) qDebug() << "couldn't set property messageText to" << errorString; } -- cgit v1.2.3-70-g09d2