Skip to content

Commit

Permalink
Fix heap-use-after-free when ctrl-clicking controls in a container
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyqiu committed Oct 26, 2024
1 parent 61accf0 commit 574b413
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

// Remove not movable nodes
for (CanvasItem *E : selection) {
if (!_is_node_movable(E, true)) {
for (List<CanvasItem *>::Element *E = selection.front(); E;) {
List<CanvasItem *>::Element *N = E->next();
if (!_is_node_movable(E->get(), true)) {
selection.erase(E);
}
E = N;
}

drag_selection = selection;
Expand Down

0 comments on commit 574b413

Please sign in to comment.