Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -81,6 +81,11 @@ void TabletScriptingInterface::setQmlTabletRoot(QString tabletId, QQuickItem* qm · 80 unmodified lines | |||
| 81 | 81 | ||
| 82 | QQuickWindow* TabletScriptingInterface::getTabletWindow() { | 82 | QQuickWindow* TabletScriptingInterface::getTabletWindow() { |
| 83 | TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system")); | 83 | TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system")); |
| 84 | |||
| 85 | if (!tablet) { | ||
| 86 | return nullptr; | ||
| 87 | } | ||
| 88 | |||
| 84 | QObject* qmlSurface = tablet->getTabletSurface(); | 89 | QObject* qmlSurface = tablet->getTabletSurface(); |
| 85 | OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface); | 90 | OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface); |
| 86 | 91 | ||