You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix heap-use-after-free when changing 2D editor selection
This commit is contained in:
@@ -3659,10 +3659,12 @@ void CanvasItemEditor::_draw_selection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove non-movable nodes.
|
// Remove non-movable nodes.
|
||||||
for (CanvasItem *ci : selection) {
|
for (List<CanvasItem *>::Element *E = selection.front(); E;) {
|
||||||
if (!_is_node_movable(ci)) {
|
List<CanvasItem *>::Element *N = E->next();
|
||||||
selection.erase(ci);
|
if (!_is_node_movable(E->get())) {
|
||||||
|
selection.erase(E);
|
||||||
}
|
}
|
||||||
|
E = N;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!selection.is_empty() && transform_tool && show_transformation_gizmos) {
|
if (!selection.is_empty() && transform_tool && show_transformation_gizmos) {
|
||||||
|
|||||||
Reference in New Issue
Block a user