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:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
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;
}