Bug 4255: When you are in HMD and you go to file menu quit, it crashes and you have no menus when you come back.

Fixed NPE of buttonProxy while doing addButtonProxyToQmlTablet on quitting the application.
This commit is contained in:
volansystech 2017-05-09 22:07:32 +05:30
parent d40984b475
commit 34edc2345c

View file

@ -250,6 +250,10 @@ static void addButtonProxyToQmlTablet(QQuickItem* qmlTablet, TabletButtonProxy*
if (QThread::currentThread() != qmlTablet->thread()) {
connectionType = Qt::BlockingQueuedConnection;
}
if (buttonProxy == NULL){
qCCritical(scriptengine) << "TabletScriptingInterface addButtonProxyToQmlTablet buttonProxy is NULL";
return;
}
bool hasResult = QMetaObject::invokeMethod(qmlTablet, "addButtonProxy", connectionType,
Q_RETURN_ARG(QVariant, resultVar), Q_ARG(QVariant, buttonProxy->getProperties()));
if (!hasResult) {