diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2018-11-05 13:48:27 -0800 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2018-11-05 13:48:27 -0800 |
commit | 562d241b13acda02245cabab16548532257a7a8f (patch) | |
tree | 46c419147fbc40923e0f8128cc57ff109037de12 /scene/gui/tree.cpp | |
parent | 3cf3c4137a4e6a5e25d7950ff727ec2157e40a37 (diff) |
Fix creating a visual script virtual function after minimizing crashes #23536
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r-- | scene/gui/tree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 0c11181f98..31f7a21114 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2519,7 +2519,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { pressing_for_editor = false; } - if (cache.click_type == Cache::CLICK_BUTTON) { + if (cache.click_type == Cache::CLICK_BUTTON && cache.click_item != NULL) { // make sure in case of wrong reference after reconstructing whole TreeItems cache.click_item = get_item_at_position(cache.click_pos); emit_signal("button_pressed", cache.click_item, cache.click_column, cache.click_id); |