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:
authorJoshua Leung <aligorith@gmail.com>2010-12-19 04:59:52 +0300
committerJoshua Leung <aligorith@gmail.com>2010-12-19 04:59:52 +0300
commit096369e89d1f036864e01a0e48d745b0d056748a (patch)
tree7b6ea4f55aacbd454edb2cb5758afbc624ddd1cc /source/blender/editors/curve
parent831684fd8f8f92df340c7853b1f391f8510d1482 (diff)
[#25278] Ctrl-left click in beizer edit mode with no selection results
in crash. This commit fixes the crash (missing null check for nu==NULL). However, there is still a problem here with Curve Ctrl-Click not behaving the same as Mesh EditMode Ctrl-Click, which adds a new vert no matter what (i.e. no previous selection required). Then again, that's a separate "todo" issue, so we can close this report now :)
Diffstat (limited to 'source/blender/editors/curve')
-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 f57c51fd559..24ad1ba7e48 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4335,7 +4335,10 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
findselectedNurbvert(&editnurb->nurbs, &nu, &bezt, &bp);
- if((nu->type==CU_BEZIER && bezt==NULL) || (nu->type!=CU_BEZIER && bp==NULL)) {
+ if ((nu == NULL) || (nu->type==CU_BEZIER && bezt==NULL) || (nu->type!=CU_BEZIER && bp==NULL)) {
+ /* FIXME: this is inconsistent with mesh ctrl-click, where clicking anywhere will add a vert,
+ * even without existing data to extrude
+ */
return OPERATOR_CANCELLED;
}