Fix creating a visual script virtual function after minimizing crashes #23536
This commit is contained in:
parent
3cf3c4137a
commit
562d241b13
1 changed files with 1 additions and 1 deletions
|
@ -2519,7 +2519,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
|
||||||
pressing_for_editor = false;
|
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
|
// make sure in case of wrong reference after reconstructing whole TreeItems
|
||||||
cache.click_item = get_item_at_position(cache.click_pos);
|
cache.click_item = get_item_at_position(cache.click_pos);
|
||||||
emit_signal("button_pressed", cache.click_item, cache.click_column, cache.click_id);
|
emit_signal("button_pressed", cache.click_item, cache.click_column, cache.click_id);
|
||||||
|
|
Loading…
Reference in a new issue