Browse Source

Avoid using a nullptr root in Tree._range_click_timeout().

Fixes #46648
voxelv 4 years ago
parent
commit
f17f3f8830
1 changed files with 4 additions and 0 deletions
  1. 4 0
      scene/gui/tree.cpp

+ 4 - 0
scene/gui/tree.cpp

@@ -2135,6 +2135,10 @@ void Tree::_range_click_timeout() {
 			}
 		}
 
+		if (!root) {
+			return;
+		}
+
 		click_handled = false;
 		Ref<InputEventMouseButton> mb;
 		mb.instantiate();