Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,7 @@ FormEditorItem* DragTool::calculateContainer(const QPointF &point, FormEditorIte ...@@ -182,7 +182,7 @@ FormEditorItem* DragTool::calculateContainer(const QPointF &point, FormEditorIte
return formEditorItem; 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 scene()->rootFormEditorItem();
return 0; return 0;
} }
......
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