Files
test2/source
Falk David 56bd0c7e4a Fix #124995: Crashes in rendering code due to invalid material indices
The issue was that some `material_index` were `-1`. This meant that
the rendering code was accessing out-of-bounds memory to read
from the material pool.

The fix adds an assert to the `gpencil_material_resources_get` and
clamps the `material_index` to >= 0 to ensure that the material is
valid. It also changes the default read value for the material indices
in `create_curves_outline` and `retrieve_visible_strokes` to be 0
instead of -1.

Pull Request: https://projects.blender.org/blender/blender/pulls/125309
2024-07-23 14:35:25 +02:00
..