Fix T45385: Crash on render occurring when two hair modifiers are active that both...
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 13 Jul 2015 09:01:34 +0000 (11:01 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 13 Jul 2015 09:01:34 +0000 (11:01 +0200)
Not sure it's totally correct solution, but seems reasonable because it's
possible dmcache is set to ISCHILD.

Someone more familiar with the particles code might want to revisit this :)

source/blender/render/intern/source/convertblender.c

index 1da1a81fe95c1c7a6271ba5e01a134d657ba387d..9392baeb1ca79ba41fc610101b6b55de77a19f00 100644 (file)
@@ -1250,7 +1250,7 @@ static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int
        /* get uvco */
        if (sd->uvco && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
                for (i=0; i<sd->totuv; i++) {
-                       if (num != DMCACHE_NOTFOUND) {
+                       if (!ELEM(num, DMCACHE_NOTFOUND, DMCACHE_ISCHILD)) {
                                MFace *mface = dm->getTessFaceData(dm, num, CD_MFACE);
                                MTFace *mtface = (MTFace*)CustomData_get_layer_n(&dm->faceData, CD_MTFACE, i);
                                mtface += num;