[vlc-commits] qt: menus: Fix memory leak

Hugo Beauzée-Luyssen git at videolan.org
Tue May 16 17:41:48 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue May 16 17:13:46 2017 +0200| [87d62e2877785913bf515b40803847f02d6886a4] | committer: Hugo Beauzée-Luyssen

qt: menus: Fix memory leak

Adding an action to an actionGroup doesn't change the ownership

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

 modules/gui/qt/menus.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 43c23aaca4..4fb4d64e76 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -1557,7 +1557,7 @@ void VLCMenuBar::updateAudioDevice( intf_thread_t * p_intf, audio_output_t *p_ao
 
     for( int i = 0; i < i_result; i++ )
     {
-        action = new QAction( qfue( names[i] ), NULL );
+        action = new QAction( qfue( names[i] ), actionGroup );
         action->setData( ids[i] );
         action->setCheckable( true );
         if( (selected && !strcmp( ids[i], selected ) ) ||



More information about the vlc-commits mailing list