History

check for null when we dont

Dante Ruiz committed 9 years ago

Commit b2a11aa1 parent 788849e1 file · +5 −0Browse files

Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/TabletScriptingInterface.cpp+5−0
@@ -81,6 +81,11 @@ void TabletScriptingInterface::setQmlTabletRoot(QString tabletId, QQuickItem* qm · 80 unmodified lines
8181
8282 QQuickWindow* TabletScriptingInterface::getTabletWindow() {
8383 TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system"));
84+
85+ if (!tablet) {
86+ return nullptr;
87+ }
88+
8489 QObject* qmlSurface = tablet->getTabletSurface();
8590 OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface);
8691