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:
authorJacques Lucke <jacques@blender.org>2020-07-16 17:41:36 +0300
committerJacques Lucke <jacques@blender.org>2020-07-16 17:43:42 +0300
commit56b8adb9e241a5a560592b25dc44b02c8790cff3 (patch)
tree488b09a0367a32a641fe77283b569e9880fed6bf
parent1494ad20b9b31bb910b802d41bbc12a298d221e5 (diff)
Particles: avoid crash when connected unimplemented node
-rw-r--r--source/blender/blenkernel/intern/simulation.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc
index 7ba6e07fb64..831de084500 100644
--- a/source/blender/blenkernel/intern/simulation.cc
+++ b/source/blender/blenkernel/intern/simulation.cc
@@ -619,9 +619,12 @@ static const ParticleFunction *create_particle_function_for_inputs(
Vector<const ParticleFunctionInput *> per_particle_inputs;
for (const fn::MFOutputSocket *socket : dummy_deps) {
- StringRef attribute_name = attribute_inputs.lookup(socket);
+ const std::string *attribute_name = attribute_inputs.lookup_ptr(socket);
+ if (attribute_name == nullptr) {
+ return nullptr;
+ }
per_particle_inputs.append(&resources.construct<ParticleAttributeInput>(
- AT, attribute_name, socket->data_type().single_type()));
+ AT, *attribute_name, socket->data_type().single_type()));
}
const fn::MultiFunction &per_particle_fn = resources.construct<fn::MFNetworkEvaluator>(