Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 2c66bd39e0a..cd27b7b5773 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -119,6 +119,7 @@ static void fileselect_ensure_updated_asset_params(SpaceFile *sfile)
"FileAssetSelectParams");
asset_params->base_params.details_flags = U_default.file_space_data.details_flags;
asset_params->asset_library.type = FILE_ASSET_LIBRARY_LOCAL;
+ asset_params->asset_library.custom_library_index = -1;
}
FileSelectParams *base_params = &asset_params->base_params;
@@ -419,8 +420,10 @@ static void fileselect_refresh_asset_params(FileAssetSelectParams *asset_params)
/* Ensure valid repo, or fall-back to local one. */
if (library->type == FILE_ASSET_LIBRARY_CUSTOM) {
- user_library = BKE_preferences_asset_library_find_from_name(
- &U, library->custom_library_identifier);
+ BLI_assert(library->custom_library_index >= 0);
+
+ user_library = BKE_preferences_asset_library_find_from_index(&U,
+ library->custom_library_index);
if (!user_library) {
library->type = FILE_ASSET_LIBRARY_LOCAL;
}