Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r--source/blender/editors/curve/editcurve.c5
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? */