From de35a90f9f56d3ff3ac80c13bf1ae296853ba877 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Wed, 24 Nov 2021 09:27:47 +0100 Subject: 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. --- source/blender/editors/asset/intern/asset_ops.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender') 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; } -- cgit v1.2.3