[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33775] trunk/blender/source/blender/ editors/curve/editcurve.c: [#25278] Ctrl-left click in beizer edit mode with no selection results

Joshua Leung aligorith at gmail.com
Sun Dec 19 02:59:53 CET 2010


Revision: 33775
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33775
Author:   aligorith
Date:     2010-12-19 02:59:52 +0100 (Sun, 19 Dec 2010)

Log Message:
-----------
[#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 :)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/curve/editcurve.c

Modified: trunk/blender/source/blender/editors/curve/editcurve.c
===================================================================
--- trunk/blender/source/blender/editors/curve/editcurve.c	2010-12-19 01:55:07 UTC (rev 33774)
+++ trunk/blender/source/blender/editors/curve/editcurve.c	2010-12-19 01:59:52 UTC (rev 33775)
@@ -4335,7 +4335,10 @@
 
 	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;
 	}
 





More information about the Bf-blender-cvs mailing list