Files
test/source
Falk David cb0ab83eab Fix #127527: Crash drawing with non-GP material
It was possible for a Grease Pencil object to have a material
with no Grease Pencil settings. This can lead to crashes in many
places because it's often assumed that the material has
these settings.

The fix makes sure that `BKE_object_material_get` returns
a Grease Pencil material when called on a Grease Pencil
object.  If the Grease Pencil settings don't exist,
it returns `nullptr`.

In the future, it should be possible to have these materials
and code that reads from the settings should fall back to
the default material.

Pull Request: https://projects.blender.org/blender/blender/pulls/127570
2024-09-16 12:03:05 +02:00
..