Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-11-24 11:27:47 +0300
committerJeroen Bakker <jeroen@blender.org>2021-11-24 11:27:47 +0300
commitde35a90f9f56d3ff3ac80c13bf1ae296853ba877 (patch)
treec9774b11ebc6b643ce20e8368a7758d33ba1e458 /source/blender/editors/asset
parentebe5a5eca8132e121b854e10d1d481d84061cbc2 (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/blender/editors/asset')
-rw-r--r--source/blender/editors/asset/intern/asset_ops.cc3
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;
}