Fix T60351: Blender crashes when using fill tool without existent keyframe
authorAntonioya <blendergit@gmail.com>
Wed, 9 Jan 2019 15:39:07 +0000 (16:39 +0100)
committerAntonioya <blendergit@gmail.com>
Wed, 9 Jan 2019 15:39:07 +0000 (16:39 +0100)
source/blender/editors/gpencil/gpencil_fill.c

index 554b94a..aa1a3a6 100644 (file)
@@ -222,7 +222,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4])
 
                /* if active layer and no keyframe, create a new one */
                if (gpl == tgpf->gpl) {
-                       if (gpl->actframe->framenum != cfra_eval) {
+                       if ((gpl->actframe == NULL) || (gpl->actframe->framenum != cfra_eval)) {
                                BKE_gpencil_layer_getframe(gpl, cfra_eval, GP_GETFRAME_ADD_NEW);
                        }
                }