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:
Bastien Montagne 2015-10-01 12:03:09 +02:00
parent 83a94cb3f2
commit 0f43fbcd8c
Notes: blender-bot 2023-02-14 08:35:45 +01:00
Referenced by issue #46339, Edge sliding when there is only one vertex in the mesh crashes blender
1 changed files with 1 additions and 0 deletions

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);