mirror of
https://github.com/godotengine/godot.git
synced 2026-01-08 00:25:01 +03:00
Fix creating a visual script virtual function after minimizing crashes #23536
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user