Cleanup: quiet warning
authorCampbell Barton <ideasman42@gmail.com>
Mon, 26 Jun 2017 21:37:27 +0000 (07:37 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 26 Jun 2017 21:39:44 +0000 (07:39 +1000)
Passing NULL arg when nonnull attr is used.

source/blender/editors/transform/transform.c

index 81d8f64045f4acb84bcab3da367e279f7c855070..87bf23fd710e5858ce032c1256f87f7ecf5d24e3 100644 (file)
@@ -2015,8 +2015,10 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
                                View3D *v3d = t->view;
 
                                v3d->twmode = t->current_orientation;
-                               BLI_assert(BKE_workspace_transform_orientation_get_index(CTX_wm_workspace(C), t->custom_orientation)
-                                          == v3d->custom_orientation_index);
+
+                               BLI_assert(((v3d->custom_orientation_index == -1) && (t->custom_orientation == NULL)) ||
+                                          (BKE_workspace_transform_orientation_get_index(
+                                                   CTX_wm_workspace(C), t->custom_orientation) == v3d->custom_orientation_index));
                        }
                }
        }