Fix #147680: Crash when voxel size is too small
These grid creation functions can return a grid without data when certain parameters are invalid. The "set_output" function of the geometry node execution parameters asserts that the data is not null, so I assume this is invalid and causes crashes later on. Pull Request: https://projects.blender.org/blender/blender/pulls/147741
This commit is contained in:
@@ -50,6 +50,10 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
params.extract_input<float>("Voxel Size"),
|
||||
params.extract_input<float>("Gradient Width"),
|
||||
params.extract_input<float>("Density"));
|
||||
if (!grid) {
|
||||
params.set_default_remaining_outputs();
|
||||
return;
|
||||
}
|
||||
params.set_output("Density Grid", std::move(grid));
|
||||
#else
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
|
||||
@@ -45,6 +45,10 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
mesh->corner_tris(),
|
||||
params.extract_input<float>("Voxel Size"),
|
||||
std::max(1, params.extract_input<int>("Band Width")));
|
||||
if (!grid) {
|
||||
params.set_default_remaining_outputs();
|
||||
return;
|
||||
}
|
||||
params.set_output("SDF Grid", std::move(grid));
|
||||
#else
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
|
||||
Reference in New Issue
Block a user