[Bf-blender-cvs] [f3384e79da0] greasepencil-object: Fix error when undo

Antonio Vazquez noreply at git.blender.org
Tue Jul 11 16:47:19 CEST 2017


Commit: f3384e79da098ebce7bf38569cca96eae4caab11
Author: Antonio Vazquez
Date:   Tue Jul 11 16:46:59 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBf3384e79da098ebce7bf38569cca96eae4caab11

Fix error when undo

The drawing cache must set to dirty to avoid segment fault

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

M	source/blender/editors/gpencil/gpencil_undo.c

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

diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 7a9ad2b32c0..0d2be0ab8c2 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -112,6 +112,9 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name)
 				}
 			}
 		}
+		/* drawing batch cache is dirty now */
+		BKE_gpencil_batch_cache_dirty(new_gpd);
+		new_gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
 	}
 	
 	WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);




More information about the Bf-blender-cvs mailing list