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 ctrl-clicking controls in a container
This commit is contained in:
@@ -1464,10 +1464,12 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) {
|
|||||||
List<CanvasItem *> selection = _get_edited_canvas_items(false, true, &has_locked_items);
|
List<CanvasItem *> selection = _get_edited_canvas_items(false, true, &has_locked_items);
|
||||||
|
|
||||||
// Remove not movable nodes
|
// Remove not movable nodes
|
||||||
for (CanvasItem *E : selection) {
|
for (List<CanvasItem *>::Element *E = selection.front(); E;) {
|
||||||
if (!_is_node_movable(E, true)) {
|
List<CanvasItem *>::Element *N = E->next();
|
||||||
|
if (!_is_node_movable(E->get(), true)) {
|
||||||
selection.erase(E);
|
selection.erase(E);
|
||||||
}
|
}
|
||||||
|
E = N;
|
||||||
}
|
}
|
||||||
|
|
||||||
drag_selection = selection;
|
drag_selection = selection;
|
||||||
|
|||||||
Reference in New Issue
Block a user