[vlc-commits] Qt4: fix playlist crash

Rémi Denis-Courmont git at videolan.org
Tue Jul 19 17:17:54 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 19 18:28:34 2011 +0300| [3e9aae7e561c5a74b3b524b366d8f4cef440deeb] | committer: Rémi Denis-Courmont

Qt4: fix playlist crash

qtr() is misused in place of qtu().

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 modules/gui/qt4/components/playlist/playlist.cpp |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index 4a07c8a..3c3816d 100644
--- a/modules/gui/qt4/components/playlist/playlist.cpp
+++ b/modules/gui/qt4/components/playlist/playlist.cpp
@@ -281,13 +281,12 @@ void LocationBar::setIndex( const QModelIndex &index )
         QString text;
 
         char *fb_name = input_item_GetTitle( item->inputItem() );
-        if( !EMPTY_STR( fb_name ) )
-             text = qfu(fb_name);
-        else
+        if( EMPTY_STR( fb_name ) )
         {
+            free( fb_name );
             fb_name = input_item_GetName( item->inputItem() );
-            text = qtr(fb_name);
         }
+        text = qfu(fb_name);
         free(fb_name);
 
         QAbstractButton *btn = new LocationButton( text, first, !first, this );



More information about the vlc-commits mailing list