diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-21 06:45:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-21 06:45:35 +0300 |
commit | 72279e1c9247c8779f75f495ed7fa99908209411 (patch) | |
tree | 341845b0bdad0a66970c81cb6d0d1dbf72af1a92 /source/blender/editors | |
parent | 8abb58b7ce39b812ceee483b85e658d09fdeea41 (diff) |
fix for RNA ranges exceeding the range of the type (INT_MAX used on short's for eg).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 1679775057c..ceb1ace849e 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4117,7 +4117,10 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) invert_m3_m3(imat,mat); findselectedNurbvert(&editnurb->nurbs, &nu, &bezt, &bp); - if(bezt==0 && bp==0) return OPERATOR_CANCELLED; + + if((nu->type==CU_BEZIER && bezt==NULL) || (nu->type!=CU_BEZIER && bp==NULL)) { + return OPERATOR_CANCELLED; + } if(nu->type == CU_BEZIER) { /* which bezpoint? */ |