[Bf-blender-cvs] [0b9041905f] blender2.8: Fix (unreported) assertion in immBegin. Zerro number of points (Ctrl+LMouse without moving in node space)
Alexander Romanov
noreply at git.blender.org
Thu Mar 23 13:53:37 CET 2017
Commit: 0b9041905faff61db41ebc6efa2d653d17b46d30
Author: Alexander Romanov
Date: Thu Mar 23 15:54:14 2017 +0300
Branches: blender2.8
https://developer.blender.org/rB0b9041905faff61db41ebc6efa2d653d17b46d30
Fix (unreported) assertion in immBegin. Zerro number of points (Ctrl+LMouse without moving in node space)
===================================================================
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 d4bbc4c7a6..b9f5a43e3e 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -414,6 +414,14 @@ 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);
+ numverts = gt->points;
+ if (gt->type == WM_GESTURE_LASSO) {
+ numverts++;
+ }
+
+ if (numverts <= 1)
+ 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