History

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.

volansystech committed 9 years ago

Commit 34edc231 parent d40984b1 file · +4 −0Browse files

Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/TabletScriptingInterface.cpp+4−0
@@ -250,6 +250,10 @@ static void addButtonProxyToQmlTablet(QQuickItem* qmlTablet, TabletButtonProxy* · 249 unmodified lines
250 if (QThread::currentThread() != qmlTablet->thread()) {250 if (QThread::currentThread() != qmlTablet->thread()) {
251 connectionType = Qt::BlockingQueuedConnection;251 connectionType = Qt::BlockingQueuedConnection;
252 }252 }
253 if (buttonProxy == NULL){
254 qCCritical(scriptengine) << "TabletScriptingInterface addButtonProxyToQmlTablet buttonProxy is NULL";
255 return;
256 }
253 bool hasResult = QMetaObject::invokeMethod(qmlTablet, "addButtonProxy", connectionType,257 bool hasResult = QMetaObject::invokeMethod(qmlTablet, "addButtonProxy", connectionType,
254 Q_RETURN_ARG(QVariant, resultVar), Q_ARG(QVariant, buttonProxy->getProperties()));258 Q_RETURN_ARG(QVariant, resultVar), Q_ARG(QVariant, buttonProxy->getProperties()));
255 if (!hasResult) {259 if (!hasResult) {