[Bf-blender-cvs] [20d9676] master: Code cleanup: As Sergey stated on bf-committers one should use id_us_min() if the user counter has to be decremented and not decrement the counter by hand.
Thomas Beck
noreply at git.blender.org
Mon Nov 25 21:47:11 CET 2013
Commit: 20d96761cbadbe738f94844f5757f6ca67bae5dd
Author: Thomas Beck
Date: Mon Nov 25 21:44:19 2013 +0100
http://developer.blender.org/rB20d96761cbadbe738f94844f5757f6ca67bae5dd
Code cleanup: As Sergey stated on bf-committers one should use id_us_min() if the user counter has to be decremented and not decrement the counter by hand.
===================================================================
M source/blender/editors/space_image/image_ops.c
===================================================================
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 401c0a4..2c2e204 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1793,7 +1793,7 @@ static int image_new_exec(bContext *C, wmOperator *op)
Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
if (tex && tex->type == TEX_IMAGE) {
if (tex->ima)
- tex->ima->id.us--;
+ id_us_min(&tex->ima->id);
tex->ima = ima;
ED_area_tag_redraw(CTX_wm_area(C));
}
More information about the Bf-blender-cvs
mailing list