]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist_model.cpp
Qt4: fix pontential NULL dereference and show the right containing forlder.
[vlc] / 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() ) );
            }