Fix #119860: Undo crash in asset browser poll function

`asset_lib` is null when calling undo in active file browser space.
This causes crash in `asset undo poll`. So exit out of the poll function
when active file space is filebrowser.

Pull Request: https://projects.blender.org/blender/blender/pulls/119870
This commit is contained in:
Pratik Borhade
2024-03-25 14:00:38 +01:00
committed by Pratik Borhade
parent f6190dcf9f
commit 209db414e0

View File

@@ -582,7 +582,7 @@ static void ASSET_OT_catalog_delete(wmOperatorType *ot)
static asset_system::AssetCatalogService *get_catalog_service(bContext *C)
{
const SpaceFile *sfile = CTX_wm_space_file(C);
if (!sfile) {
if (!sfile || ED_fileselect_is_file_browser(sfile)) {
return nullptr;
}