diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-27 09:14:06 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-27 09:14:06 -0700 |
commit | 975ca2e56a5f8b31591c73b59a903e22e20fafe0 (patch) | |
tree | 6138c3376d060c46df1e1afd088fbd1a2eaca352 /qt-mobile/qmlmanager.cpp | |
parent | 75e736a66b4ed5fa502e06a5ed7e02690981165e (diff) | |
download | subsurface-975ca2e56a5f8b31591c73b59a903e22e20fafe0.tar.gz |
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>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |