Merge pull request #96688 from matheusmdx/fix-environment-tree-error

Fix `is_inside_tree` error when inspecting an Environment resource
This commit is contained in:
Rémi Verschelde 2024-09-08 23:22:12 +02:00
commit dba8c65fab
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -636,7 +636,7 @@ void EditorSpinSlider::_grabber_mouse_exited() {
void EditorSpinSlider::set_read_only(bool p_enable) {
read_only = p_enable;
if (read_only && value_input) {
if (read_only && value_input && value_input->is_inside_tree()) {
value_input->release_focus();
}