diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index 12a55c25fe1..adf962c2cce 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -464,14 +464,11 @@ QProcessEnvironment PuppetCreator::processEnvironment() const #ifndef QMLDESIGNER_TEST view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView(); view->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)}); -#endif - - QStringList importPaths = m_model->importPaths(); QmlDesigner::Import import = QmlDesigner::Import::createLibraryImport("QtQuick3D", "1.0"); bool view3DEnabled = false; - if (view && m_model->hasImport(import, true, true)) { + if (m_model->hasImport(import, true, true)) { if (view->rootModelNode().hasAuxiliaryData("3d-view")) view3DEnabled = view->rootModelNode().auxiliaryData("3d-view").toBool(); else @@ -480,6 +477,9 @@ QProcessEnvironment PuppetCreator::processEnvironment() const if (view3DEnabled) environment.set("QMLDESIGNER_QUICK3D_MODE", "true"); +#endif + + QStringList importPaths = m_model->importPaths(); /* For the fallback puppet we have to remove the path to the original qtbase plugins to avoid conflics */ if (m_availablePuppetType == FallbackPuppet) diff --git a/src/plugins/qmldesigner/documentmanager.cpp b/src/plugins/qmldesigner/documentmanager.cpp index 45fd4957590..2cae7208c5d 100644 --- a/src/plugins/qmldesigner/documentmanager.cpp +++ b/src/plugins/qmldesigner/documentmanager.cpp @@ -424,7 +424,8 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists, if (!iconQrcFileNode) { // The QRC file that we want doesn't exist or is not listed under RESOURCES in the .pro. - *resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile; + if (project) + *resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile; // We assume that the .pro containing the QML file is an acceptable place to add the .qrc file. ProjectExplorer::ProjectNode *projectNode = ProjectExplorer::ProjectTree::nodeForFile(qmlFileName)->parentProjectNode();