bugfix [#24766] Crasher on inserting keyframe on Bezier points [33126]

This commit is contained in:
Campbell Barton 2010-11-17 12:52:56 +00:00
parent 376d129dc6
commit 17aa5ae796

@ -95,15 +95,17 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
break;
}
}
}
if(nu_index) {
*nu_index= i;
}
if(pt_index) {
if(nu->type == CU_BEZIER) *pt_index= (int)((BezTriple *)point - nu->bezt);
else *pt_index= (int)((BPoint *)point - nu->bp);
if(nu) {
if(nu_index) {
*nu_index= i;
}
if(pt_index) {
if(nu->type == CU_BEZIER) *pt_index= (int)((BezTriple *)point - nu->bezt);
else *pt_index= (int)((BPoint *)point - nu->bp);
}
}
return nu;