Fix T92149: Crash in delete geometry node after curve fill node
There was only a check for the component but not for if it was empty. Because the curve fill node produces an empty curve component, a nullptr was read, causing a crash. Generally nodes shouldn't produce empty components, but currently we cannot rely on that fact. Differential Revision: https://developer.blender.org/D12838
This commit is contained in:
parent
0c7e836a1d
commit
5e3877e0c8
Notes:
blender-bot
2023-02-13 17:26:35 +01:00
Referenced by issue #92149, Geometry Nodes: Using Delete Geometry node after Fill Curve node causes a crash
|
@ -1156,19 +1156,19 @@ void separate_geometry(GeometrySet &geometry_set,
|
|||
bool &r_is_error)
|
||||
{
|
||||
bool some_valid_domain = false;
|
||||
if (geometry_set.has<PointCloudComponent>()) {
|
||||
if (geometry_set.has_pointcloud()) {
|
||||
if (domain == ATTR_DOMAIN_POINT) {
|
||||
separate_point_cloud_selection(geometry_set, selection_field, invert);
|
||||
some_valid_domain = true;
|
||||
}
|
||||
}
|
||||
if (geometry_set.has<MeshComponent>()) {
|
||||
if (geometry_set.has_mesh()) {
|
||||
if (domain != ATTR_DOMAIN_CURVE) {
|
||||
separate_mesh_selection(geometry_set, selection_field, domain, mode, invert);
|
||||
some_valid_domain = true;
|
||||
}
|
||||
}
|
||||
if (geometry_set.has<CurveComponent>()) {
|
||||
if (geometry_set.has_curve()) {
|
||||
if (ELEM(domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CURVE)) {
|
||||
separate_curve_selection(geometry_set, selection_field, domain, invert);
|
||||
some_valid_domain = true;
|
||||
|
|
Loading…
Reference in New Issue