Remove NULL check from gimbal_axis

This commit is contained in:
Campbell Barton
2017-04-06 11:32:20 +10:00
parent 40cb5a067b
commit e63ba6d0f4
2 changed files with 47 additions and 49 deletions

View File

@@ -201,7 +201,6 @@ static int test_rotmode_euler(short rotmode)
bool gimbal_axis(Object *ob, float gmat[3][3])
{
if (ob) {
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan = BKE_pose_channel_active(ob);
@@ -260,7 +259,6 @@ bool gimbal_axis(Object *ob, float gmat[3][3])
}
return 1;
}
}
return 0;
}

View File

@@ -451,7 +451,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
case V3D_MANIP_GIMBAL:
unit_m3(t->spacemtx);
if (gimbal_axis(ob, t->spacemtx)) {
if (ob && gimbal_axis(ob, t->spacemtx)) {
BLI_strncpy(t->spacename, IFACE_("gimbal"), sizeof(t->spacename));
break;
}