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.
This commit is contained in:
2021-11-24 09:27:47 +01:00
parent ebe5a5eca8
commit de35a90f9f

View File

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