Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8.0 RC
-
-
08b0e3e39 (dev), 0ae3697cf (6.8)
Description
QQuickItem::mapToItem() can crash if called during initialization of the Qml scene while the window is not mapped yet.
QPointF QQuickItem::mapToItem(const QQuickItem *item, const QPointF &point) const { QPointF p = mapToScene(point); if (item) { if (item->window() != window()) p = item->window()->mapFromGlobal(window()->mapToGlobal(p)); p = item->mapFromScene(p); } return p; }
There are two null check missing in
p = item->window()->mapFromGlobal(window()->mapToGlobal(p));
.
Btw, how could that line of code pass code review? It violently violates the SLR principle.
Attachments
Issue Links
- links to