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:
parent
75e736a66b
commit
975ca2e56a
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user