Revision: 58952
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58952
Author:   nazgul
Date:     2013-08-06 02:37:02 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
Add assert to mul_v3_m3v3 and mul_v2_m3v3,
So they're not likely to be called with bad arguments.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/math_matrix.c

Modified: trunk/blender/source/blender/blenlib/intern/math_matrix.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_matrix.c   2013-08-06 
02:34:50 UTC (rev 58951)
+++ trunk/blender/source/blender/blenlib/intern/math_matrix.c   2013-08-06 
02:37:02 UTC (rev 58952)
@@ -433,6 +433,8 @@
 
 void mul_v3_m3v3(float r[3], float M[3][3], const float a[3])
 {
+       BLI_assert(r != a);
+
        r[0] = M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2];
        r[1] = M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2];
        r[2] = M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2];
@@ -440,6 +442,8 @@
 
 void mul_v2_m3v3(float r[2], float M[3][3], const float a[3])
 {
+       BLI_assert(r != a);
+
        r[0] = M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2];
        r[1] = M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2];
 }

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

Reply via email to