[Bf-blender-cvs] [de35a90f9f5] master: Fix crash when opening search menu.

Jeroen Bakker noreply at git.blender.org
Wed Nov 24 09:29:30 CET 2021


Commit: de35a90f9f56d3ff3ac80c13bf1ae296853ba877
Author: Jeroen Bakker
Date:   Wed Nov 24 09:27:47 2021 +0100
Branches: master
https://developer.blender.org/rBde35a90f9f56d3ff3ac80c13bf1ae296853ba877

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.

===================================================================

M	source/blender/editors/asset/intern/asset_ops.cc

===================================================================

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;
   }



More information about the Bf-blender-cvs mailing list