From 03b46f7941e17906b193db39f1ff4339b02b58c6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Jun 2017 07:37:27 +1000 Subject: [PATCH] Cleanup: quiet warning Passing NULL arg when nonnull attr is used. --- source/blender/editors/transform/transform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 81d8f64045f..87bf23fd710 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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)); } } }