Commit: 83b0e975b92c7678376b83b468450f2be0af1bf3
Author: Campbell Barton
Date:   Sat Apr 20 12:31:22 2019 +0200
Branches: master
https://developer.blender.org/rB83b0e975b92c7678376b83b468450f2be0af1bf3

Cleanup: quiet warning for NULL pointer use

Warning was false positive but avoid repeating the same check.

===================================================================

M       source/blender/editors/transform/transform_conversions.c

===================================================================

diff --git a/source/blender/editors/transform/transform_conversions.c 
b/source/blender/editors/transform/transform_conversions.c
index 4346decd4a7..4f288f56f8f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2934,20 +2934,24 @@ static void createTransEditVerts(TransInfo *t)
           }
 
           /* CrazySpace */
-          if (defmats || (quats && BM_elem_flag_test(eve, BM_ELEM_TAG))) {
+          const bool use_quats = quats && BM_elem_flag_test(eve, BM_ELEM_TAG);
+          if (use_quats || defmats) {
             float mat[3][3], qmat[3][3], imat[3][3];
 
-            /* use both or either quat and defmat correction */
-            if (quats && BM_elem_flag_test(eve, BM_ELEM_TAG)) {
+            /* Use both or either quat and defmat correction. */
+            if (use_quats) {
               quat_to_mat3(qmat, quats[BM_elem_index_get(eve)]);
 
-              if (defmats)
+              if (defmats) {
                 mul_m3_series(mat, defmats[a], qmat, mtx);
-              else
+              }
+              else {
                 mul_m3_m3m3(mat, mtx, qmat);
+              }
             }
-            else
+            else {
               mul_m3_m3m3(mat, mtx, defmats[a]);
+            }
 
             invert_m3_m3(imat, mat);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to