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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-10-27 10:51:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-10-27 14:06:14 +0300
commit5f0933f07a548719a850d9cac01aae6709b9dc0b (patch)
treee31af4de22de1ef037cc8fc6784d292dd5be32e3 /source/blender/editors/interface
parentf11298692b93c79132b77d0795e6bd6080c62480 (diff)
Fix T49829: Removal of custom icon previews during add-on unregister crashes Blender.
Issue was happening when removal of custom icons was done while they were still being rendered by preview job. Now add a 'deffered deletion' system, to prevent main thread to delete preview image until loading thread is done with them. Note that ideally, calling `ED_preview_kill_jobs()` on custom icon removal would have been simpler, but we don't have easy access to context here...
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_icons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 22a450d2523..ff9d2840e9c 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1088,7 +1088,7 @@ void ui_icon_ensure_deferred(const bContext *C, const int icon_id, const bool bi
if (prv) {
const int size = big ? ICON_SIZE_PREVIEW : ICON_SIZE_ICON;
- if (id || prv->use_deferred) {
+ if (id || (prv->tag & PRV_TAG_DEFFERED) != 0) {
ui_id_preview_image_render_size(C, NULL, id, prv, size, true);
}
}