From b61b34a5d2795648c277f6ad6ea3c46425e7d715 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 6 Apr 2021 16:35:36 +0200 Subject: 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 --- source/blender/blenkernel/intern/gpencil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index f7b895c7ca7..47b9a92d4bd 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -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); } } -- cgit v1.2.3