diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-09-14 15:12:44 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-09-14 15:12:44 +0400 |
commit | e838af4d57ea1f0eef4fd62bfb0a8d6e320c72e0 (patch) | |
tree | c8e3073d2492d2b62c418abb42de578e340cfdfb /source/blender/editors/mesh/editmesh_loop.c | |
parent | f896b905ace685148dccad9ddfbda92ae1c65d85 (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.c | 5 |
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); |