diff options
Diffstat (limited to 'source/blender/editors/asset/intern/asset_ops.cc')
-rw-r--r-- | source/blender/editors/asset/intern/asset_ops.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index 1f5d3f5c101..0177a06aa0a 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -18,8 +18,6 @@ * \ingroup edasset */ -#include "BKE_asset.h" -#include "BKE_asset_catalog.hh" #include "BKE_asset_library.hh" #include "BKE_bpath.h" #include "BKE_context.h" @@ -32,8 +30,6 @@ #include "BLI_fileops.h" #include "BLI_fnmatch.h" #include "BLI_path_util.h" -#include "BLI_string_ref.hh" -#include "BLI_vector.hh" #include "ED_asset.h" #include "ED_asset_catalog.hh" @@ -46,7 +42,6 @@ #include "RNA_define.h" #include "WM_api.h" -#include "WM_types.h" #include "DNA_space_types.h" @@ -418,7 +413,7 @@ static int asset_library_refresh_exec(bContext *C, wmOperator *UNUSED(unused)) if (ED_operator_asset_browsing_active(C)) { SpaceFile *sfile = CTX_wm_space_file(C); ED_fileselect_clear(CTX_wm_manager(C), sfile); - WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, nullptr); } else { /* Execution mode #2: Outside the Asset Browser, use the asset list. */ @@ -693,6 +688,9 @@ static bool asset_bundle_install_poll(bContext *C) { /* This operator only works when the asset browser is set to Current File. */ const SpaceFile *sfile = CTX_wm_space_file(C); + if (sfile == nullptr) { + return false; + } if (!ED_fileselect_is_local_asset_library(sfile)) { return false; } |