Commit bba547d1 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: crash fix

This crashed when the template definitions were missing.

Change-Id: I22aff1b9bb809ff59f108cb90f47b19c2db223fa
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 8ffdcc60
......@@ -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")));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment