Multires: Fix memory leak on reshape
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Sep 2018 15:36:39 +0000 (17:36 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Sep 2018 15:37:14 +0000 (17:37 +0200)
Was happening when number of vertices didn't match.

source/blender/blenkernel/intern/subdiv_foreach.c

index 5c53a0e41264e77a6b5002ec9a5fb1f3e424447b..5c45d7017d34f8a33d6f649e507c9b5515959638 100644 (file)
@@ -1994,6 +1994,7 @@ bool BKE_subdiv_foreach_subdiv_geometry(
                                            ctx.num_subdiv_loops,
                                            ctx.num_subdiv_polygons))
                {
+                       subdiv_foreach_ctx_free(&ctx);
                        return false;
                }
        }