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