[Bf-blender-cvs] [7b0bc1573b0] blender-v3.3-release: Fix memory leak exporting to collada

Campbell Barton noreply at git.blender.org
Tue Aug 9 13:05:45 CEST 2022


Commit: 7b0bc1573b02198ec71f808fa1f6d1a2c6b79524
Author: Campbell Barton
Date:   Tue Aug 9 21:03:45 2022 +1000
Branches: blender-v3.3-release
https://developer.blender.org/rB7b0bc1573b02198ec71f808fa1f6d1a2c6b79524

Fix memory leak exporting to collada

===================================================================

M	source/blender/io/collada/EffectExporter.cpp

===================================================================

diff --git a/source/blender/io/collada/EffectExporter.cpp b/source/blender/io/collada/EffectExporter.cpp
index 71a54e3a7c9..40ce20617fc 100644
--- a/source/blender/io/collada/EffectExporter.cpp
+++ b/source/blender/io/collada/EffectExporter.cpp
@@ -46,6 +46,7 @@ EffectsExporter::EffectsExporter(COLLADASW::StreamWriter *sw,
 
 bool EffectsExporter::hasEffects(Scene *sce)
 {
+  bool result = false;
   FOREACH_SCENE_OBJECT_BEGIN (sce, ob) {
     int a;
     for (a = 0; a < ob->totcol; a++) {
@@ -56,11 +57,12 @@ bool EffectsExporter::hasEffects(Scene *sce)
         continue;
       }
 
-      return true;
+      result = true;
+      break;
     }
   }
   FOREACH_SCENE_OBJECT_END;
-  return false;
+  return result;
 }
 
 void EffectsExporter::exportEffects(bContext *C, Scene *sce)



More information about the Bf-blender-cvs mailing list