Fix T87236: crash reading file with grease pencil palettes

Caused by typo in {rB76689e851700}.

Since Palettes and bGPDpalette are not the same size, this would not
only cause a crash in versioning code, but could only go downhill from
here on.

Maniphest Tasks: T87236

Differential Revision: https://developer.blender.org/D10903
This commit is contained in:
Philipp Oeser 2021-04-06 16:35:36 +02:00
parent b93c445809
commit b61b34a5d2
Notes: blender-bot 2023-02-14 06:42:53 +01:00
Referenced by issue #87236, Crash on opening specific file
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd)
/* relink palettes (old palettes deprecated, only to convert old files) */
BLO_read_list(reader, &gpd->palettes);
if (gpd->palettes.first != NULL) {
LISTBASE_FOREACH (Palette *, palette, &gpd->palettes) {
LISTBASE_FOREACH (bGPDpalette *, palette, &gpd->palettes) {
BLO_read_list(reader, &palette->colors);
}
}