diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-11-24 11:27:47 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-11-24 11:27:47 +0300 |
commit | de35a90f9f56d3ff3ac80c13bf1ae296853ba877 (patch) | |
tree | c9774b11ebc6b643ce20e8368a7758d33ba1e458 /source | |
parent | ebe5a5eca8132e121b854e10d1d481d84061cbc2 (diff) |
Fix crash when opening search menu.
Asset install bundle poll didn't check the space it was running in and
assumed that it was always running in file browser.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/asset/intern/asset_ops.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index 3c4f6b8755f..ae046cd5b03 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -688,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; } |