Cycles: Fix access of NULL pointer as array
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Apr 2017 13:07:25 +0000 (15:07 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Apr 2017 13:08:00 +0000 (15:08 +0200)
Was confusing guarded allocator for some reason.

intern/cycles/blender/blender_mesh.cpp

index 304b1992032192a18868fc59c53fe3ee373bdb2a..54571b1fea1b9306af03790253788114cf6edc4c 100644 (file)
@@ -560,6 +560,9 @@ static void attr_create_pointiness(Scene *scene,
                return;
        }
        const int num_verts = b_mesh.vertices.length();
+       if(num_verts == 0) {
+               return;
+       }
        /* STEP 1: Find out duplicated vertices and point duplicates to a single
         *         original vertex.
         */