Selaa lähdekoodia

Fix is_inside_tree error when inspecting an Environment resource

matheusmdx 1 vuosi sitten
vanhempi
commit
1eacd1fd0e
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      editor/gui/editor_spin_slider.cpp

+ 1 - 1
editor/gui/editor_spin_slider.cpp

@@ -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();
 	}