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 7fdb924d769..bb72c5cc1bb 100644 --- a/source/blender/editors/asset/intern/asset_list.cc +++ b/source/blender/editors/asset/intern/asset_list.cc @@ -351,7 +351,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) @@ -422,6 +422,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) { |