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:
authorAntonioya <blendergit@gmail.com>2019-03-06 21:31:01 +0300
committerAntonioya <blendergit@gmail.com>2019-03-06 21:31:01 +0300
commitb39985eddb2a2182497f457daeb3125d4862e0a2 (patch)
tree28e4c8886eb70dd9d72049b6f6931b8fd0d136ad /source/blender/draw
parent59f30e9390d446b5ef0ab4048f654507fc51a822 (diff)
GPencil: Fix unreported segment fault drawing with dots
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c8
1 files changed, 3 insertions, 5 deletions
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);
}