[Bf-blender-cvs] [0f43fbc] master: Fix T46339: Edge sliding when there is only one vertex in the mesh crashes blender.

Bastien Montagne noreply at git.blender.org
Thu Oct 1 12:07:42 CEST 2015


Commit: 0f43fbcd8c81f15c00be6bce9c3bb2a46ae7310e
Author: Bastien Montagne
Date:   Thu Oct 1 12:03:09 2015 +0200
Branches: master
https://developer.blender.org/rB0f43fbcd8c81f15c00be6bce9c3bb2a46ae7310e

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.

===================================================================

M	source/blender/editors/transform/transform.c

===================================================================

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 2b295b8..6931efd 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -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);




More information about the Bf-blender-cvs mailing list