diff --git a/libraries/script-engine/src/TabletScriptingInterface.cpp b/libraries/script-engine/src/TabletScriptingInterface.cpp index 60e40c76f5..7e18551862 100644 --- a/libraries/script-engine/src/TabletScriptingInterface.cpp +++ b/libraries/script-engine/src/TabletScriptingInterface.cpp @@ -81,6 +81,11 @@ void TabletScriptingInterface::setQmlTabletRoot(QString tabletId, QQuickItem* qm QQuickWindow* TabletScriptingInterface::getTabletWindow() { TabletProxy* tablet = qobject_cast(getTablet("com.highfidelity.interface.tablet.system")); + + if (!tablet) { + return nullptr; + } + QObject* qmlSurface = tablet->getTabletSurface(); OffscreenQmlSurface* surface = dynamic_cast(qmlSurface);