[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29185] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/winged_edge/WEdge.cpp: Fix for a memory leak in WingedEdgeBuilder.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Thu Jun 3 17:04:55 CEST 2010


Revision: 29185
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29185
Author:   kjym3
Date:     2010-06-03 17:04:55 +0200 (Thu, 03 Jun 2010)

Log Message:
-----------
Fix for a memory leak in WingedEdgeBuilder.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.cpp	2010-06-03 14:26:38 UTC (rev 29184)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.cpp	2010-06-03 15:04:55 UTC (rev 29185)
@@ -626,7 +626,12 @@
   // 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)





More information about the Bf-blender-cvs mailing list