Fix T46339: Edge sliding when there is only one vertex in the mesh crashes blender.

If t->mode remains edge/vert slide, restoreTransObjects() ends up calling
projectVert/EdgeSlideData(), which tries to access invalid customdata...

Not sure why we call again restoreTransObjects() and resetTransRestrictions() here tbh,
but safer not to change that for now.

Should be backported to 2.76 if possible.
This commit is contained in:
2015-10-01 12:03:09 +02:00
parent 83a94cb3f2
commit 0f43fbcd8c

View File

@@ -1037,6 +1037,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
}
/* vert slide can fail on unconnected vertices (rare but possible) */
if (t->state == TRANS_CANCEL) {
t->mode = TFM_TRANSLATION;
t->state = TRANS_STARTING;
restoreTransObjects(t);
resetTransRestrictions(t);