forked from qt-creator/qt-creator
QmlDesigner: fixes crash
If there was no form editor item for the root we crashed in the drop code Reviewed-by: Kai Koehne
This commit is contained in:
@@ -182,7 +182,7 @@ FormEditorItem* DragTool::calculateContainer(const QPointF &point, FormEditorIte
|
||||
return formEditorItem;
|
||||
}
|
||||
|
||||
if (scene()->rootFormEditorItem()->boundingRect().adjusted(-100, -100, 100, 100).contains(point))
|
||||
if (scene()->rootFormEditorItem() && scene()->rootFormEditorItem()->boundingRect().adjusted(-100, -100, 100, 100).contains(point))
|
||||
return scene()->rootFormEditorItem();
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user