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

@ -97,13 +97,15 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
}
}
if(nu_index) {
*nu_index= i;
}
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);
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;