forked from bartvdbraak/blender
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).
This commit is contained in:
parent
f896b905ac
commit
e838af4d57
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user