diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index c2cd6f282e8..ebc46d7573b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1422,9 +1422,10 @@ static void write_particlesettings(WriteData *wd, ParticleSettings *part) if (part->instance_collection) { /* can be NULL if lining fails or set to None */ FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object) { - if (object != dw->ob) { - dw->index++; + if (object == dw->ob) { + break; } + dw->index++; } FOREACH_COLLECTION_OBJECT_RECURSIVE_END; } |