[vlc-devel] commit: CLEAN QT4 fix some memory leaks. Reorgazine code (basos g )

git version control git at videolan.org
Tue Apr 28 13:14:36 CEST 2009


vlc | branch: master | basos g <noxelia 4t gmail d0t c0m> | Mon Apr  6 15:31:26 2009 +0000| [9e11ce644d04463fb97a30770237eff39e12428a] | committer: Rémi Duraffort 

CLEAN QT4 fix some memory leaks. Reorgazine code
(hacked a bit)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e11ce644d04463fb97a30770237eff39e12428a
---

 modules/gui/qt4/components/open_panels.cpp |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index cd6e0ab..0548406 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -1294,7 +1294,8 @@ void CaptureOpenPanel::advancedDialog()
         module_config_t *p_item = p_config + n;
         ConfigControl *config = ConfigControl::createControl(
                         VLC_OBJECT( p_intf ), p_item, advFrame, gLayout, n );
-        controls.append( config );
+        if ( config )
+            controls.append( config );
     }
 
     /* Button stuffs */
@@ -1317,11 +1318,6 @@ void CaptureOpenPanel::advancedDialog()
         for( int i = 0; i < controls.size(); i++ )
         {
             ConfigControl *control = controls[i];
-            if( !control )
-            {
-                msg_Dbg( p_intf, "This shouldn't happen, please report" );
-                continue;
-            }
 
             tempMRL += (i ? " :" : ":");
 
@@ -1351,6 +1347,11 @@ void CaptureOpenPanel::advancedDialog()
         updateMRL();
         msg_Dbg( p_intf, "%s", qtu( advMRL ) );
     }
+    for( int i = 0; i < controls.size(); i++ )
+    {
+        ConfigControl *control = controls[i];
+        delete control ;
+    }
     delete adv;
     module_config_free( p_config );
     module_release (p_module);




More information about the vlc-devel mailing list