Fix #118404: Crash in grease pencil transform code

The code wrongly used the `ob_eval->data` to try and get the
`GreasePencil` data.
The `ob_eval` only needs to be used to access the transform
to get the `layer.to_world_space`
This commit is contained in:
Falk David
2024-02-21 16:24:01 +01:00
parent fc5e2b94bc
commit 572cac7a11
@@ -82,7 +82,7 @@ static void createTransGreasePencilVerts(bContext *C, TransInfo *t)
continue;
}
Object *object_eval = DEG_get_evaluated_object(depsgraph, tc.obedit);
GreasePencil &grease_pencil = *static_cast<GreasePencil *>(object_eval->data);
GreasePencil &grease_pencil = *static_cast<GreasePencil *>(tc.obedit->data);
Span<const bke::greasepencil::Layer *> layers = grease_pencil.layers();
int layer_points_offset = 0;