]> git.sesse.net Git - vlc/commitdiff
Qt4: fix pontential NULL dereference and show the right containing forlder.
authorRémi Duraffort <ivoire@videolan.org>
Thu, 18 Feb 2010 17:15:19 +0000 (18:15 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 18 Feb 2010 17:22:25 +0000 (18:22 +0100)
modules/gui/qt4/components/playlist/playlist_model.cpp

index fdb9f288a9e433331b25f5aa8af8384c2d446d56..8345c0e7227d3403f0736c9905f054a8e6426729 100644 (file)
@@ -1013,11 +1013,11 @@ void PLModel::popupExplore()
            char  *psz_path;
            input_SplitMRL( &psz_access, &psz_demux, &psz_path, psz_meta );
 
-           if( EMPTY_STR( psz_access ) ||
-               !strncasecmp( psz_access, "file", 4 ) ||
-               !strncasecmp( psz_access, "dire", 4 ) )
+           if( !EMPTY_STR( psz_access ) && (
+                   !strncasecmp( psz_access, "file", 4 ) ||
+                   !strncasecmp( psz_access, "dire", 4 ) ))
            {
-               QFileInfo info( qfu( psz_meta ) );
+               QFileInfo info( qfu( psz_path ) );
                QDesktopServices::openUrl(
                                QUrl::fromLocalFile( info.absolutePath() ) );
            }