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>2009-09-14 15:12:44 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-14 15:12:44 +0400
commite838af4d57ea1f0eef4fd62bfb0a8d6e320c72e0 (patch)
treec8e3073d2492d2b62c418abb42de578e340cfdfb /source/blender/editors/mesh/editmesh_loop.c
parentf896b905ace685148dccad9ddfbda92ae1c65d85 (diff)
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).
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loop.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index c98b387d28a..28103828dd4 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -60,6 +60,7 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
#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 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
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);