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 | 82 | QQuickWindow* TabletScriptingInterface::getTabletWindow() { |
| 83 | 83 | TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system")); |
| 84 | + | |
| 85 | + if (!tablet) { | |
| 86 | + return nullptr; | |
| 87 | + } | |
| 88 | + | |
| 84 | 89 | QObject* qmlSurface = tablet->getTabletSurface(); |
| 85 | 90 | OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface); |
| 86 | 91 | |