[Bf-blender-cvs] [8946c53] soc-2013-paint: remove redundant NULL checks
Campbell Barton
noreply at git.blender.org
Sat Jul 12 12:45:17 CEST 2014
Commit: 8946c538f6627a3b98586be1c58f49674ef32bcf
Author: Campbell Barton
Date: Sat Jul 12 20:01:53 2014 +1000
https://developer.blender.org/rB8946c538f6627a3b98586be1c58f49674ef32bcf
remove redundant NULL checks
===================================================================
M source/blender/blenkernel/intern/brush.c
===================================================================
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 84cfe92..4b4755a 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -185,14 +185,9 @@ Brush *BKE_brush_copy(Brush *brush)
/* not brush itself */
void BKE_brush_free(Brush *brush)
{
- if (brush->mtex.tex)
- id_us_min(&brush->mtex.tex->id);
-
- if (brush->mask_mtex.tex)
- id_us_min(&brush->mask_mtex.tex->id);
-
- if (brush->paint_curve)
- id_us_min(&brush->paint_curve->id);
+ id_us_min((ID *)brush->mtex.tex);
+ id_us_min((ID *)brush->mask_mtex.tex);
+ id_us_min((ID *)brush->paint_curve);
if (brush->icon_imbuf)
IMB_freeImBuf(brush->icon_imbuf);
More information about the Bf-blender-cvs
mailing list