[Bf-blender-cvs] [e12e55ae259] temp-modifiers-instancing: fix crash when Group Output is not connected
Jacques Lucke
noreply at git.blender.org
Wed Nov 11 18:42:05 CET 2020
Commit: e12e55ae259c5d0c682c160d1a97d67c1603bb35
Author: Jacques Lucke
Date: Wed Nov 11 18:41:30 2020 +0100
Branches: temp-modifiers-instancing
https://developer.blender.org/rBe12e55ae259c5d0c682c160d1a97d67c1603bb35
fix crash when Group Output is not connected
===================================================================
M source/blender/modifiers/intern/MOD_nodes.cc
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 60b346671c3..1791ab1fcc6 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -853,6 +853,9 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
GeometrySetPtr input_geometry_set = GeometrySet::create_with_mesh(
mesh, GeometryOwnershipType::Editable);
GeometrySetPtr output_geometry_set = modifyGeometry(md, ctx, std::move(input_geometry_set));
+ if (!output_geometry_set.has_value()) {
+ return BKE_mesh_new_nomain(0, 0, 0, 0, 0);
+ }
Mesh *new_mesh = output_geometry_set->get_component_for_write<MeshComponent>().release();
if (new_mesh == nullptr) {
return BKE_mesh_new_nomain(0, 0, 0, 0, 0);
More information about the Bf-blender-cvs
mailing list