From ba1ac7c180d6e56518497871c9c4f1df235cb00b Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 10 Sep 2018 15:07:15 -0700 Subject: [PATCH] Ensure a web overlay doesn't access an invalid tabletScriptingInterface --- interface/src/ui/overlays/Web3DOverlay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interface/src/ui/overlays/Web3DOverlay.cpp b/interface/src/ui/overlays/Web3DOverlay.cpp index c16b4c016d..9d55c91ef3 100644 --- a/interface/src/ui/overlays/Web3DOverlay.cpp +++ b/interface/src/ui/overlays/Web3DOverlay.cpp @@ -132,7 +132,9 @@ void Web3DOverlay::destroyWebSurface() { if (rootItem && rootItem->objectName() == "tabletRoot") { auto tabletScriptingInterface = DependencyManager::get(); - tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", nullptr); + if (tabletScriptingInterface) { + tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", nullptr); + } } // Fix for crash in QtWebEngineCore when rapidly switching domains