diff options
Diffstat (limited to 'source/blender/blenlib/BLI_iterator.h')
-rw-r--r-- | source/blender/blenlib/BLI_iterator.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_iterator.h b/source/blender/blenlib/BLI_iterator.h index dffdeec949a..d8929b6e73a 100644 --- a/source/blender/blenlib/BLI_iterator.h +++ b/source/blender/blenlib/BLI_iterator.h @@ -43,10 +43,12 @@ typedef void (*IteratorBeginCb)(BLI_Iterator *iter, void *data_in); IteratorCb callback_end_func = callback_end; \ BLI_Iterator iter_macro; \ iter_macro.skip = false; \ + iter_macro.valid = false; \ for (callback_begin(&iter_macro, (_data_in)); \ iter_macro.valid; \ callback_next(&iter_macro)) \ { \ + BLI_assert(iter_macro.valid); \ if (iter_macro.skip) { \ iter_macro.skip = false; \ continue; \ |