Commit 02250e13 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: fixes crash

If there was no form editor item for the root we crashed in
the drop code

Reviewed-by: Kai Koehne
parent b1577b0e
......@@ -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;
}
......
Supports Markdown
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