Fix: Operator search crash when no asset library is present
Appears to be due to missing null check. `filelist->asset_library` is null if no file path is selected for user library. Pull Request: https://projects.blender.org/blender/blender/pulls/122134
This commit is contained in:
committed by
Pratik Borhade
parent
241c19a57a
commit
f9e42519ae
@@ -579,7 +579,11 @@ static asset_system::AssetCatalogService *get_catalog_service(bContext *C)
|
||||
}
|
||||
|
||||
asset_system::AssetLibrary *asset_lib = ED_fileselect_active_asset_library_get(sfile);
|
||||
return &asset_lib->catalog_service();
|
||||
if (asset_lib) {
|
||||
return &asset_lib->catalog_service();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static int asset_catalog_undo_exec(bContext *C, wmOperator * /*op*/)
|
||||
|
||||
Reference in New Issue
Block a user