Skip to content

Commit e18ded5

Browse files
committed
Fix subinspector for shader preview in visual shader editor
1 parent e1b4101 commit e18ded5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

editor/editor_properties.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,8 +3438,10 @@ void EditorPropertyResource::update_property() {
34383438
sub_inspector->set_use_doc_hints(true);
34393439

34403440
EditorInspector *parent_inspector = get_parent_inspector();
3441-
ERR_FAIL_NULL(parent_inspector);
3442-
sub_inspector->set_root_inspector(parent_inspector->get_root_inspector());
3441+
if (parent_inspector != nullptr) {
3442+
sub_inspector->set_root_inspector(parent_inspector->get_root_inspector());
3443+
sub_inspector->register_text_enter(parent_inspector->search_box);
3444+
}
34433445

34443446
sub_inspector->set_property_name_style(InspectorDock::get_singleton()->get_property_name_style());
34453447

@@ -3454,7 +3456,6 @@ void EditorPropertyResource::update_property() {
34543456
sub_inspector->set_focus_mode(FocusMode::FOCUS_NONE);
34553457

34563458
sub_inspector->set_use_filter(use_filter);
3457-
sub_inspector->register_text_enter(parent_inspector->search_box);
34583459

34593460
add_child(sub_inspector);
34603461
set_bottom_editor(sub_inspector);

0 commit comments

Comments
 (0)