Qt4: fix pontential NULL dereference and show the right containing forlder.

This commit is contained in:
Rémi Duraffort 2010-02-18 18:15:19 +01:00
parent f5de3aee2c
commit 012e93a733

View 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() ) );
}