Skip to content
Snippets Groups Projects
Commit 679e3ac1 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.Model: fix wrong assert

This assert is simply wrong. A component
might reparent the item inside an item,
that has no instance.
parent b21b8a7a
No related branches found
No related tags found
No related merge requests found
......@@ -326,7 +326,9 @@ AnchorLine QmlAnchors::instanceAnchor(AnchorLine::Type sourceAnchorLine) const
if (targetAnchorLine == AnchorLine::Invalid )
return AnchorLine();
Q_ASSERT(targetAnchorLinePair.second.isValid());
if (!targetAnchorLinePair.second.isValid()) //there might be no node instance for the parent
return AnchorLine();
return AnchorLine(QmlItemNode(qmlItemNode().nodeForInstance(targetAnchorLinePair.second)), targetAnchorLine);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment