Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-03-15 13:41:56 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-03-15 15:57:52 +0300
commite00f52aeab4a264f732aecd236e7503088e6b16b (patch)
treeb8008e35503fd2a0b2568b1ddb0c7043e365604e /source/blender/windowmanager/intern/wm_gesture.c
parent279bcd8492ad57b67d5c50370570622aba464f5e (diff)
Fix crash on node editor when using lasso to remove nodes connections
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index b7a34b329b7..74dd9914c30 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);