Fix invalid stack memory use with GPencil drawing
authorCampbell Barton <ideasman42@gmail.com>
Sat, 20 Apr 2019 11:35:14 +0000 (13:35 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 20 Apr 2019 13:13:40 +0000 (15:13 +0200)
source/blender/editors/space_action/action_draw.c

index b2baace..a517aa3 100644 (file)
@@ -271,9 +271,9 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
         }
         else if (ac->datatype == ANIMCONT_GPENCIL) {
           unsigned char *color;
+          unsigned char gpl_col[4];
           if ((show_group_colors) && (ale->type == ANIMTYPE_GPLAYER)) {
             bGPDlayer *gpl = (bGPDlayer *)ale->data;
-            unsigned char gpl_col[4];
             rgb_float_to_uchar(gpl_col, gpl->color);
             gpl_col[3] = col1[3];