QmlDesigner: Fix puppet crash

Change-Id: I2a408d090c4bbf2c3da7f03473312eff4b7e6c34
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2020-06-10 18:01:12 +02:00
parent 83148cbb89
commit ad4c5e0258
@@ -768,7 +768,8 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC
qWarning() << error;
}
object->setProperty("__designer_url__", QUrl::fromLocalFile(componentPath));
if (object)
object->setProperty("__designer_url__", QUrl::fromLocalFile(componentPath));
return object;
}