summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorvoxelv <timslippy@librem.one>2021-06-23 22:54:00 -0700
committervoxelv <timslippy@librem.one>2021-06-30 00:27:44 -0700
commitf17f3f8830088304d7144a8eb3c25d9956f3aa20 (patch)
treee45595391dcf5c29d0dcf78ccee65a4e4d04480a /scene
parentbcd1fc832fff5c1cc1efa4d2450b9e2919b972c9 (diff)
Avoid using a nullptr root in Tree._range_click_timeout().
Fixes #46648
Diffstat (limited to 'scene')
-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 aac15cd9a5..0a0b5d4a08 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2135,6 +2135,10 @@ void Tree::_range_click_timeout() {
}
}
+ if (!root) {
+ return;
+ }
+
click_handled = false;
Ref<InputEventMouseButton> mb;
mb.instantiate();