diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 44631e368a3..3189efeb939 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -373,6 +373,7 @@ class FILEBROWSER_PT_advanced_filter(Panel): def poll(cls, context): # only useful in append/link (library) context currently... return ( + context.space_data.params and context.space_data.params.use_library_browsing and panel_poll_is_upper_region(context.region) and not panel_poll_is_asset_browsing(context) @@ -423,6 +424,10 @@ class FILEBROWSER_PT_directory_path(Panel): return True + @classmethod + def poll(cls, context): + return context.space_data.params + def draw(self, context): layout = self.layout space = context.space_data diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 37a56816677..7d9b8583838 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -82,6 +82,9 @@ void ED_file_path_button(bScreen *screen, PointerRNA params_rna_ptr; uiBut *but; + BLI_assert_msg(params != NULL, + "File select parameters not set. The caller is expected to check this."); + RNA_pointer_create(&screen->id, &RNA_FileSelectParams, params, ¶ms_rna_ptr); /* callbacks for operator check functions */