From e949ac0bfc4c64040e6ac425989e833c19b3e26c Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Sat, 20 Nov 2021 10:34:29 -0300 Subject: [PATCH] Cleanup: unset 'FILE_ENTRY_PREVIEW_LOADING' at the end Although this function only runs on the main thread, it seems safer to clear the flag only after setting the result. --- source/blender/editors/space_file/filelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index b85dadf1f8e..6f929c43e13 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -2661,7 +2661,6 @@ bool filelist_cache_previews_update(FileList *filelist) // printf("%s: %d - %s - %p\n", __func__, preview->index, preview->path, preview->img); if (entry) { - entry->flags &= ~FILE_ENTRY_PREVIEW_LOADING; if (preview->icon_id) { /* The FILE_ENTRY_PREVIEW_LOADING flag should have prevented any other asynchronous * process from trying to generate the same preview icon. */ @@ -2678,6 +2677,7 @@ bool filelist_cache_previews_update(FileList *filelist) * preview will be retried quite often anyway. */ entry->flags |= FILE_ENTRY_INVALID_PREVIEW; } + entry->flags &= ~FILE_ENTRY_PREVIEW_LOADING; } else { BKE_icon_delete(preview->icon_id);