diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-20 16:34:29 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-20 16:34:29 +0300 |
commit | e949ac0bfc4c64040e6ac425989e833c19b3e26c (patch) | |
tree | 6c1a0702d20397b0a246d9fabb776c23ac37a2a3 /source | |
parent | 59ffe1c5b1155c22fd579685cc047ff6b7150811 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |