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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-04-16 18:09:04 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-04-16 18:38:05 +0300
commit8cb10c124efebc27a7451f3d3a4c62d23c3927b5 (patch)
treed439d3698a896a4c8e8be1d6d77e401c3e96d035
parente9bf624a498a4f0074374740737d47c5df7fd87d (diff)
Fix T75675: Unlinking [with setting users to zero] not clearing
LIB_TAG_EXTRAUSER_SET flag For example in the Image Editor, an assert would be triggered after unlinking an image [with setting users to zero] and then setting the image for the Image Editor again. Whenever we set an Image for Image Editor, the Image ID is flagged LIB_TAG_EXTRAUSER_SET, when we unlink [with setting users to zero] this flag was not cleared. quote @mont29: "a proper fix would be to move this to modern code, and actually delete the ID..." but that is for later. Maniphest Tasks: T75675 Differential Revision: https://developer.blender.org/D7452
-rw-r--r--source/blender/editors/interface/interface_templates.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 6f6a4a1718a..52afb17079d 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -536,6 +536,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
if (id && CTX_wm_window(C)->eventstate->shift) {
/* only way to force-remove data (on save) */
+ id_us_clear_real(id);
id_fake_user_clear(id);
id->us = 0;
}