Commit 0ca288f5 authored by Tim Jenssen's avatar Tim Jenssen Committed by Thomas Hartmann

QmlDesigner: fix a crash when there are missing imports

Task-number: QTCREATORBUG-16963
Change-Id: I0d4c2e018b4849b2a32cd77da8c2f979fd3befb3
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 90cf4487
......@@ -165,8 +165,10 @@ void QuickItemNodeInstance::initialize(const ObjectNodeInstance::Pointer &object
quickItem()->setParentItem(qobject_cast<QQuickItem*>(nodeInstanceServer()->quickView()->rootObject()));
}
if (s_createEffectItem || instanceId() == 0)
designerSupport()->refFromEffectItem(quickItem());
if (quickItem()->window()) {
if (s_createEffectItem || instanceId() == 0)
designerSupport()->refFromEffectItem(quickItem());
}
ObjectNodeInstance::initialize(objectNodeInstance);
quickItem()->update();
......@@ -582,8 +584,7 @@ void QuickItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParen
if (quickItem()->parentItem()) {
refresh();
if (quickItem()->window())
DesignerSupport::updateDirtyNode(quickItem());
DesignerSupport::updateDirtyNode(quickItem());
if (instanceIsValidLayoutable(oldParentInstance, oldParentProperty))
oldParentInstance->refreshLayoutable();
......
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