[Bf-blender-cvs] [b39985eddb2] master: GPencil: Fix unreported segment fault drawing with dots
Antonioya
noreply at git.blender.org
Wed Mar 6 19:31:10 CET 2019
Commit: b39985eddb2a2182497f457daeb3125d4862e0a2
Author: Antonioya
Date: Wed Mar 6 19:31:01 2019 +0100
Branches: master
https://developer.blender.org/rBb39985eddb2a2182497f457daeb3125d4862e0a2
GPencil: Fix unreported segment fault drawing with dots
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index d8ebae744e2..a96d293c381 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -683,17 +683,15 @@ static DRWShadingGroup *DRW_gpencil_shgroup_point_create(
}
/* viewport x-ray */
DRW_shgroup_uniform_int(grp, "viewport_xray", &stl->storage->is_xray, 1);
-
- stl->shgroups[id].shading_type[0] = (int)OB_RENDER;
- DRW_shgroup_uniform_int(grp, "shading_type", &stl->shgroups[id].shading_type[0], 2);
+ DRW_shgroup_uniform_int(grp, "shading_type", (const int *)&stl->storage->shade_render, 2);
}
- if (gpd) {
+ if ((gpd) && (id > -1)) {
stl->shgroups[id].xray_mode = (ob->dtx & OB_DRAWXRAY) ? GP_XRAY_FRONT : GP_XRAY_3DSPACE;
DRW_shgroup_uniform_int(grp, "xraymode", (const int *)&stl->shgroups[id].xray_mode, 1);
}
else {
- /* for drawing always on on predefined z-depth */
+ /* for drawing always on predefined z-depth */
DRW_shgroup_uniform_int(grp, "xraymode", &stl->storage->xray, 1);
}
More information about the Bf-blender-cvs
mailing list