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.

This commit is contained in:
2013-11-25 21:44:19 +01:00
parent 46cc02c5cd
commit 20d96761cb

View File

@@ -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));
}