Fix Particles: Keyed Physics crash when clicking on a particle slot

without a valid target

rB95b9680597f5 introduced code that would skip creation of GPUVertBuf
for ParticlePointCache if the keyed physics would not have a valid
target. Missing vertex buffer would lead to assert/crash.

This code is now removed (dont see a reason why this was done? afaict
2.79 also just displayed the particles without physics in this case and
this seems to be working just fine in 2.8 as well)

part of T69741

Reviewers: fclem

Maniphest Tasks: T69741

Differential Revision: https://developer.blender.org/D5781
This commit is contained in:
Philipp Oeser 2019-09-13 10:40:42 +02:00
parent 2520f78971
commit 89cc5c2bd3
1 changed files with 0 additions and 9 deletions

View File

@ -1335,15 +1335,6 @@ static void particle_batch_cache_ensure_pos(Object *object,
sim.psmd = psys_get_modifier(object, psys);
sim.psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
if (psys->part->phystype == PART_PHYS_KEYED) {
if (psys->flag & PSYS_KEYED) {
psys_count_keyed_targets(&sim);
if (psys->totkeyed == 0) {
return;
}
}
}
GPU_VERTBUF_DISCARD_SAFE(point_cache->pos);
if (format.attr_len == 0) {