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
path: root/source
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2017-05-29 17:30:02 +0300
committerLuca Rood <dev@lucarood.com>2017-05-29 17:30:56 +0300
commit818268b394f810f864c7eff29ab89b3bf787b072 (patch)
tree0beeacc7fd9c48967cdc72e9c4693e4b1acd234c /source
parent30278342d1a6a153c914539f0160d1a8163d61e8 (diff)
Fix own mistake with NULL materials in particles
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/modes/object_mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 026f0c4f275..59debb09298 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -1467,13 +1467,13 @@ static void OBJECT_cache_populate_particles(Object *ob,
case PART_DRAW_CROSS:
shgrp = DRW_shgroup_instance_create(e_data.part_prim_sh, psl->particle, DRW_cache_particles_get_prim(PART_DRAW_CROSS));
DRW_shgroup_uniform_texture(shgrp, "ramp", globals_ramp);
- DRW_shgroup_uniform_vec3(shgrp, "color", &ma->r, 1);
+ DRW_shgroup_uniform_vec3(shgrp, "color", ma ? &ma->r : def_prim_col, 1);
DRW_shgroup_uniform_int(shgrp, "screen_space", &screen_space[0], 1);
break;
case PART_DRAW_CIRC:
shgrp = DRW_shgroup_instance_create(e_data.part_prim_sh, psl->particle, DRW_cache_particles_get_prim(PART_DRAW_CIRC));
DRW_shgroup_uniform_texture(shgrp, "ramp", globals_ramp);
- DRW_shgroup_uniform_vec3(shgrp, "color", &ma->r, 1);
+ DRW_shgroup_uniform_vec3(shgrp, "color", ma ? &ma->r : def_prim_col, 1);
DRW_shgroup_uniform_int(shgrp, "screen_space", &screen_space[1], 1);
break;
case PART_DRAW_AXIS: