Particles: avoid crash when connected unimplemented node

This commit is contained in:
Jacques Lucke 2020-07-16 16:41:36 +02:00
parent 1494ad20b9
commit 56b8adb9e2
Notes: blender-bot 2023-02-14 03:52:45 +01:00
Referenced by issue #79106, Blender crash on loop cut
1 changed files with 5 additions and 2 deletions

View File

@ -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>(