Merge pull request #113939 from M4rchy-S/shdr-text-err

Add null verification to avoid background theme error in texture shader properties
This commit is contained in:
Rémi Verschelde
2026-01-20 09:49:10 +01:00

View File

@@ -468,7 +468,7 @@ void EditorProperty::_notification(int p_what) {
// Only draw the label if it's not empty.
if (label.is_empty()) {
size.height = 0;
} else if (sub_inspector_color_level >= 0) {
} else if (sub_inspector_color_level >= 0 && theme_cache.sub_inspector_background[sub_inspector_color_level].is_valid()) {
draw_style_box(theme_cache.sub_inspector_background[sub_inspector_color_level], Rect2(Vector2(), size));
} else {
draw_style_box(selected ? theme_cache.background_selected : theme_cache.background, Rect2(Vector2(), size));