Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-08-02 12:22:08 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-08-02 12:29:11 +0300
commitcb6e3e82b0bce60a8d6c121e3218398356171120 (patch)
tree328c5eeed910ac9962564cd556256e6e6c5e7eb0 /source/blender/editors/gpencil/gpencil_intern.h
parenteb2a078f4d0675874046a3281652b81b79b442c1 (diff)
GPencil: Make GP_EDITABLE_STROKES_BEGIN macro safe when stroke is removed
If the macro was used in a loop where the stroke was removed, the macro failed.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_intern.h')
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index a8a3c2f9306..1c20da4bed3 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -610,7 +610,9 @@ struct GP_EditableStrokes_Iter {
ED_gpencil_parent_location(depsgraph_, obact_, gpd_, gpl, gpstroke_iter.diff_mat); \
invert_m4_m4(gpstroke_iter.inverse_diff_mat, gpstroke_iter.diff_mat); \
/* loop over strokes */ \
- for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gps->next) { \
+ bGPDstroke *gpsn_; \
+ for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gpsn_) { \
+ gpsn_ = gps->next; \
/* skip strokes that are invalid for current view */ \
if (ED_gpencil_stroke_can_use(C, gps) == false) \
continue; \