Commit: b61b34a5d2795648c277f6ad6ea3c46425e7d715
Author: Philipp Oeser
Date:   Tue Apr 6 16:35:36 2021 +0200
Branches: master
https://developer.blender.org/rBb61b34a5d2795648c277f6ad6ea3c46425e7d715

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

===================================================================

M       source/blender/blenkernel/intern/gpencil.c

===================================================================

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);
     }
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to