Fix #140689: Paint mode crash with empty Grease Pencil layer

In this case an empty CurvesGeometry didn't contain the position
attribute. Skipping the lookup in that case should be harmless.
This commit is contained in:
Hans Goudey
2025-06-20 11:40:38 -04:00
parent 5d184bd1d6
commit 19ef847647

View File

@@ -116,6 +116,9 @@ static void remember_deformed_grease_pencil_if_necessary(const GreasePencil *gre
if (curves.points_num() != orig_drawing->strokes().points_num()) {
continue;
}
if (curves.is_empty()) {
continue;
}
drawing_hints.positions_data = save_shared_attribute(curves.attributes().lookup("position"));
}
}