[Bf-blender-cvs] [e00f52aeab] blender2.8: Fix crash on node editor when using lasso to remove nodes connections

Dalai Felinto noreply at git.blender.org
Wed Mar 15 13:59:02 CET 2017


Commit: e00f52aeab4a264f732aecd236e7503088e6b16b
Author: Dalai Felinto
Date:   Wed Mar 15 11:41:56 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBe00f52aeab4a264f732aecd236e7503088e6b16b

Fix crash on node editor when using lasso to remove nodes connections

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

M	source/blender/windowmanager/intern/wm_gesture.c

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

diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index b7a34b329b..74dd9914c3 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -404,6 +404,10 @@ static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt, bool filled)
 	unsigned pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT);
 	unsigned line_origin = add_attrib(format, "line_origin", COMP_F32, 2, KEEP_FLOAT);
 
+	if (gt->points + (gt->type == WM_GESTURE_LASSO ? 1 : 0) < 2) {
+		return;
+	}
+
 	immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_COLOR);
 
 	immUniform4f("color1", 0.4f, 0.4f, 0.4f, 1.0f);




More information about the Bf-blender-cvs mailing list