QmlDesigner: Raise exception for a invalid parent property

Change-Id: I0272b0aefc0598ad524aa1d9e6b434ef2dcd79a9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-08-06 16:11:11 +02:00
parent d3c299cbe3
commit 7f66d8fe03
6 changed files with 12 additions and 8 deletions

View File

@@ -488,7 +488,7 @@ void DesignDocument::paste()
targetNode = view.selectedModelNodes().first();
//In case we copy and paste a selection we paste in the parent item
if ((view.selectedModelNodes().count() == selectedNodes.count()) && targetNode.isValid() && targetNode.parentProperty().isValid())
if ((view.selectedModelNodes().count() == selectedNodes.count()) && targetNode.isValid() && targetNode.hasParentProperty())
targetNode = targetNode.parentProperty().parentModelNode();
if (!targetNode.isValid())