From 865796375bcfa6be4288cca4243dddcb4092f70b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 9 Nov 2015 19:47:10 +0100 Subject: 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...). --- source/blender/editors/space_node/node_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_node/node_add.c') diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index ab7fa51856a..aef1116b0b8 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -487,7 +487,7 @@ static int new_node_tree_exec(bContext *C, wmOperator *op) /* RNA_property_pointer_set increases the user count, * fixed here as the editor is the initial user. */ - ntree->id.us--; + id_us_min(&ntree->id); RNA_id_pointer_create(&ntree->id, &idptr); RNA_property_pointer_set(&ptr, prop, idptr); -- cgit v1.2.3