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>2015-11-09 21:47:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-11-09 23:00:53 +0300
commit865796375bcfa6be4288cca4243dddcb4092f70b (patch)
tree5264d4b9b0f9d392b6e1b942e0f6fd802de1fff4 /source/blender/editors/space_outliner
parentcf959a879eb5ffbdfa573c5f3a00965e69d7a976 (diff)
Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.
We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...).
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index a209681e18c..c0464c84061 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -172,7 +172,7 @@ static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEl
if (LIKELY(matar != NULL)) {
for (a = 0; a < totcol; a++) {
if (a == te->index && matar[a]) {
- matar[a]->id.us--;
+ id_us_min(&matar[a]->id);
matar[a] = NULL;
}
}
@@ -208,7 +208,7 @@ static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEle
for (a = 0; a < MAX_MTEX; a++) {
if (a == te->index && mtex[a]) {
if (mtex[a]->tex) {
- mtex[a]->tex->id.us--;
+ id_us_min(&mtex[a]->tex->id);
mtex[a]->tex = NULL;
}
}