Skip to content

Commit

Permalink
Properly handle multiple parent drag, fixes #19460
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Nov 19, 2018
1 parent 35fbbeb commit 55ded6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scene/main/viewport.cpp
Expand Up @@ -1900,7 +1900,13 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (gui.drag_data.get_type() != Variant::NIL) {

gui.mouse_focus = NULL;
break;
} else {
if (gui.drag_preview != NULL) {
ERR_PRINT("Don't set a drag preview and return null data. Preview was deleted and drag request ignored.");
memdelete(gui.drag_preview);
gui.drag_preview = NULL;
}
gui.dragging = false;
}

Expand Down

0 comments on commit 55ded6b

Please sign in to comment.