Merge pull request #13970 from jherico/fix/fb18149

Ensure a web overlay doesn't access an invalid tabletScriptingInterface
This commit is contained in:
Brad Hefta-Gaub 2018-09-11 09:31:33 -07:00 committed by GitHub
commit ab1718747b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,9 @@ void Web3DOverlay::destroyWebSurface() {
if (rootItem && rootItem->objectName() == "tabletRoot") {
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
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