From 0af08cea40964b69a48a2be773aeb22304d2b46f Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 20 Jul 2021 21:18:10 +0200 Subject: Cleanup: Use asset utility function to get the asset .blend path For this to work, the utility function needs to be callable without context, which is only needed for a File Browser specific hack anyway (doesn't apply to this usage of it). --- source/blender/editors/asset/asset_list.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/asset/asset_list.cc') diff --git a/source/blender/editors/asset/asset_list.cc b/source/blender/editors/asset/asset_list.cc index 3095239b711..e610a1dfbcd 100644 --- a/source/blender/editors/asset/asset_list.cc +++ b/source/blender/editors/asset/asset_list.cc @@ -500,7 +500,7 @@ std::string ED_assetlist_asset_filepath_get(const bContext *C, return {}; } const char *library_path = ED_assetlist_library_path(&library_reference); - if (!library_path) { + if (!library_path && C) { library_path = assetlist_library_path_from_sfile_get_hack(C); } if (!library_path) { -- cgit v1.2.3