summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-07 01:21:32 +0200
committerGitHub <noreply@github.com>2021-07-07 01:21:32 +0200
commitce941397e5507fc0c1154a2e393331aa6099f66b (patch)
tree76cdaa03a7fc0e6455c337399547d26916ac95f5 /scene/gui
parent5d7c23dcc66758000544d7ef841e7db11ae51c4e (diff)
parentf17f3f8830088304d7144a8eb3c25d9956f3aa20 (diff)
Merge pull request #49890 from voxelv/fix_tree_range_click_timeout_crash_46648
Avoid using a nullptr root in Tree._range_click_timeout().
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/tree.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index fd9e87604f..98de71d81c 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2155,6 +2155,10 @@ void Tree::_range_click_timeout() {
}
}
+ if (!root) {
+ return;
+ }
+
click_handled = false;
Ref<InputEventMouseButton> mb;
mb.instantiate();