diff options
Diffstat (limited to 'source/blender/editors/asset/intern/asset_list.cc')
-rw-r--r-- | source/blender/editors/asset/intern/asset_list.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/asset/intern/asset_list.cc b/source/blender/editors/asset/intern/asset_list.cc index b641c9d6ffc..fc71882d88f 100644 --- a/source/blender/editors/asset/intern/asset_list.cc +++ b/source/blender/editors/asset/intern/asset_list.cc @@ -355,7 +355,7 @@ void AssetListStorage::fetch_library(const AssetLibraryReference &library_refere void AssetListStorage::destruct() { - global_storage().~AssetListMap(); + global_storage().clear(); } AssetList *AssetListStorage::lookup_list(const AssetLibraryReference &library_ref) @@ -427,6 +427,18 @@ void ED_assetlist_storage_fetch(const AssetLibraryReference *library_reference, AssetListStorage::fetch_library(*library_reference, *C); } +bool ED_assetlist_is_loaded(const AssetLibraryReference *library_reference) +{ + AssetList *list = AssetListStorage::lookup_list(*library_reference); + if (!list) { + return false; + } + if (list->needsRefetch()) { + return false; + } + return true; +} + void ED_assetlist_ensure_previews_job(const AssetLibraryReference *library_reference, const bContext *C) { |