[Bf-blender-cvs] [ff6e2e82ea1] greasepencil-object: Fix: Crash when moving GP frame so that it replaces the one before it

Joshua Leung noreply at git.blender.org
Fri Nov 17 14:46:39 CET 2017


Commit: ff6e2e82ea14bbcf4249cb6c5b67418086ff721c
Author: Joshua Leung
Date:   Sat Nov 18 02:45:07 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBff6e2e82ea14bbcf4249cb6c5b67418086ff721c

Fix: Crash when moving GP frame so that it replaces the one before it

This crash only occurred in a particular file, when onion skinning was
enabled. For some reason, the fact that this function was clearing the
layer's actframe (when the frame being deleted wasn't currently active)
was causing problems. I'm guessing that the GP draw engine code currently
assumes that gpl->actframe will always be set/valid?

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

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

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

diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index be9d62f7b9c..7d5933f6df6 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1340,8 +1340,6 @@ bool BKE_gpencil_layer_delframe(bGPDlayer *gpl, bGPDframe *gpf)
 	 */
 	if (gpl->actframe == gpf)
 		gpl->actframe = gpf->prev;
-	else
-		gpl->actframe = NULL;
 	
 	/* free the frame and its data */
 	changed = BKE_gpencil_free_strokes(gpf);



More information about the Bf-blender-cvs mailing list