Crash on deleting an element being dragged

• Dec 5, 2019 - 08:29
Reported version
3.3
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

Came from a crash reporter.

1) Start dragging an element (e.g. dynamics, but this is reproducible with other elements too).
2) While holding left mouse button, press Delete.
3) Continue dragging, or just release mouse button.
Result: crash.

This is reproducible since 3.1.0 version, 3.0.5 seems to be unaffected by this.


Comments

Status PR created fixed

Fixed in branch master, commit 6fd217c017

_fix #298141: crash on deleting an element being dragged

When the element is being dragged, it is selected, but if it's deleted, then the selection changes. This causes this in endDrag() to change to the parent element, but since the EditData parameter (ed) is still that of the deleted element, ed.getData(this) returns a nullptr which directly leads to a crash._

Fix version
3.4.0