diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc index 0c3a11061ab..941c589855a 100644 --- a/source/blender/asset_system/intern/asset_library_service.cc +++ b/source/blender/asset_system/intern/asset_library_service.cc @@ -207,6 +207,12 @@ void AssetLibraryService::reload_all_library_catalogs_if_dirty() AssetLibrary *AssetLibraryService::get_asset_library_all(const Main *bmain) { + if (all_library_) { + CLOG_INFO(&LOG, 2, "get all lib (cached)"); + all_library_->refresh_catalogs(); + return all_library_.get(); + } + /* (Re-)load all other asset libraries. */ for (AssetLibraryReference &library_ref : all_valid_asset_library_refs()) { /* Skip self :) */ @@ -218,12 +224,6 @@ AssetLibrary *AssetLibraryService::get_asset_library_all(const Main *bmain) this->get_asset_library(bmain, library_ref); } - if (all_library_) { - CLOG_INFO(&LOG, 2, "get all lib (cached)"); - all_library_->refresh_catalogs(); - return all_library_.get(); - } - CLOG_INFO(&LOG, 2, "get all lib (loaded)"); all_library_ = std::make_unique();