forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: crash fix
This crashed when the template definitions were missing. Change-Id: I22aff1b9bb809ff59f108cb90f47b19c2db223fa Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
@@ -54,7 +54,7 @@ enum {
|
||||
|
||||
const char resourcePropertyEditorPath[] = ":/propertyeditor";
|
||||
|
||||
static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration;
|
||||
static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration = QmlJS::SimpleReaderNode::Ptr();
|
||||
|
||||
static inline QString propertyTemplatesPath()
|
||||
{
|
||||
@@ -345,7 +345,7 @@ QString PropertyEditorQmlBackend::templateGeneration(NodeMetaInfo type,
|
||||
NodeMetaInfo superType,
|
||||
const QmlObjectNode &objectNode)
|
||||
{
|
||||
if (!templateConfiguration() && templateConfiguration()->isValid())
|
||||
if (!templateConfiguration() || !templateConfiguration()->isValid())
|
||||
return QString();
|
||||
|
||||
QStringList imports = variantToStringList(templateConfiguration()->property(QLatin1String("imports")));
|
||||
|
Reference in New Issue
Block a user