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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-06-03 19:04:55 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-06-03 19:04:55 +0400
commitc0d18491b6493c55c7239eaee0ae84eea1581667 (patch)
tree298ead558c196ff9f8fa6a7000467ed035e3540a /source/blender/freestyle/intern/winged_edge
parent8fe1d461e34caa5c017f56cee7b4d07038a9bf03 (diff)
Fix for a memory leak in WingedEdgeBuilder.
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge')
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/WEdge.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
index 1a3c9341374..31082e3376f 100755
--- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
@@ -626,7 +626,12 @@ WFace* WShape::MakeFace(vector<WVertex*>& iVertexList, unsigned iMaterial)
// allocate the new face
WFace *face = instanciateFace();
- return MakeFace(iVertexList, iMaterial, face);
+ WFace *result = MakeFace(iVertexList, iMaterial, face);
+ if (0 == result) {
+ delete face;
+ return 0;
+ }
+ return result;
}
WFace * WShape::MakeFace(vector<WVertex*>& iVertexList, vector<Vec3r>& iNormalsList, vector<Vec2r>& iTexCoordsList, unsigned iMaterial)