check for null when we dont

This commit is contained in:
Dante Ruiz 2017-04-19 21:30:43 +01:00
parent 788849e19a
commit b2a11aa9ab

View file

@ -81,6 +81,11 @@ void TabletScriptingInterface::setQmlTabletRoot(QString tabletId, QQuickItem* qm
QQuickWindow* TabletScriptingInterface::getTabletWindow() {
TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system"));
if (!tablet) {
return nullptr;
}
QObject* qmlSurface = tablet->getTabletSurface();
OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface);