[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23212] trunk/blender/source/blender/ editors/mesh/editmesh_loop.c: Bugfix #19337: Crash when tweaking knife operator

Joshua Leung aligorith at gmail.com
Mon Sep 14 13:12:44 CEST 2009


Revision: 23212
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23212
Author:   aligorith
Date:     2009-09-14 13:12:44 +0200 (Mon, 14 Sep 2009)

Log Message:
-----------
Bugfix #19337: Crash when tweaking knife operator

Knife operator now doesn't crash, but repeat operator for this won't work now since the appropriate 3D-View context info is not set when the mouse is in the Tools region (i.e. when using repeat operator in the tools panels).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mesh/editmesh_loop.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_loop.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_loop.c	2009-09-14 10:56:40 UTC (rev 23211)
+++ trunk/blender/source/blender/editors/mesh/editmesh_loop.c	2009-09-14 11:12:44 UTC (rev 23212)
@@ -60,6 +60,7 @@
 #include "BKE_library.h"
 #include "BKE_mesh.h"
 #include "BKE_object.h"
+#include "BKE_report.h"
 #include "BKE_utildefines.h"
 
 #include "PIL_time.h"
@@ -637,6 +638,10 @@
 	int len=0;
 	short numcuts=1, mode= RNA_int_get(op->ptr, "type");
 	
+	/* edit-object needed for matrix, and ar->regiondata for projections to work */
+	if (ELEM3(NULL, obedit, ar, ar->regiondata))
+		return OPERATOR_CANCELLED;
+	
 	if (EM_nvertices_selected(em) < 2) {
 		error("No edges are selected to operate on");
 		BKE_mesh_end_editmesh(obedit->data, em);





More information about the Bf-blender-cvs mailing list