summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
authorDelf Neumärker <delf@nmrkr.de>2021-02-24 12:47:14 +0100
committerDelf Neumärker <delf@nmrkr.de>2021-02-24 20:59:17 +0100
commiteaa04c1a222b57ccbc5a54a71e0793f0d4ad64e6 (patch)
treec3e6d3e4d20caba18656acee9e6e5a0514f707da /scene/main/viewport.h
parentd4191e48c5f4af920e87a70fe3c5ae9219a3332b (diff)
Fix crash during drag if user freed the drag preview
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 2a0026a561..0f11e6fb19 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -357,7 +357,7 @@ private:
Point2 drag_accum;
bool drag_attempted = false;
Variant drag_data;
- Control *drag_preview = nullptr;
+ ObjectID drag_preview_id;
float tooltip_timer = -1.0;
float tooltip_delay = 0.0;
Transform2D focus_inv_xform;
@@ -415,6 +415,7 @@ private:
void _gui_force_drag(Control *p_base, const Variant &p_data, Control *p_control);
void _gui_set_drag_preview(Control *p_base, Control *p_control);
+ Control *_gui_get_drag_preview();
void _gui_remove_focus_for_window(Node *p_window);
void _gui_remove_focus();