Commit: dc01586b4063142a3736993eb4a6e4fec893bed1
Author: Luca Rood
Date:   Tue May 16 17:42:14 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBdc01586b4063142a3736993eb4a6e4fec893bed1

Fix crash when particle display is below 100%

===================================================================

M       source/blender/draw/intern/draw_cache_impl_particles.c

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c 
b/source/blender/draw/intern/draw_cache_impl_particles.c
index b6c532d62e5..ae099e03719 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -147,7 +147,7 @@ static void ensure_seg_pt_count(ParticleSystem *psys, 
ParticleBatchCache *cache)
                        for (int i = 0; i < psys->totpart; i++) {
                                ParticleCacheKey *path = psys->pathcache[i];
 
-                               if (path->segments) {
+                               if (path->segments > 0) {
                                        cache->segment_count += path->segments;
                                        cache->point_count += path->segments + 
1;
                                }
@@ -160,7 +160,7 @@ static void ensure_seg_pt_count(ParticleSystem *psys, 
ParticleBatchCache *cache)
                        for (int i = 0; i < child_count; i++) {
                                ParticleCacheKey *path = psys->childcache[i];
 
-                               if (path->segments) {
+                               if (path->segments > 0) {
                                        cache->segment_count += path->segments;
                                        cache->point_count += path->segments + 
1;
                                }
@@ -197,7 +197,7 @@ static void 
particle_batch_cache_ensure_pos_and_seg(ParticleSystem *psys, Partic
                        for (int i = 0; i < psys->totpart; i++) {
                                ParticleCacheKey *path = psys->pathcache[i];
 
-                               if (path->segments) {
+                               if (path->segments > 0) {
                                        float tangent[3];
 
                                        for (int j = 0; j < path->segments; 
j++) {
@@ -235,7 +235,7 @@ static void 
particle_batch_cache_ensure_pos_and_seg(ParticleSystem *psys, Partic
                                ParticleCacheKey *path = psys->childcache[i];
                                float tangent[3];
 
-                               if (path->segments) {
+                               if (path->segments > 0) {
                                        for (int j = 0; j < path->segments; 
j++) {
                                                if (j == 0) {
                                                        sub_v3_v3v3(tangent, 
path[j + 1].co, path[j].co);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to