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

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to