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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-07-27 09:14:06 -07:00
parent 75e736a66b
commit 975ca2e56a

View file

@ -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;
}