Commit 2cfc9f51 authored by Jean-Philippe André's avatar Jean-Philippe André

Qt: fix crash in the playlist model

Bug: right-click on an empty node leads to a segfault
parent ba740b33
...@@ -922,9 +922,11 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode ...@@ -922,9 +922,11 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
qtr(I_POP_STREAM), this, SLOT( popupStream() ) ); qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) ); menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
menu.addAction( QIcon( ":/menu/info" ), qtr(I_POP_INFO), this, SLOT( popupInfo() ) ); menu.addAction( QIcon( ":/menu/info" ), qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
if( !strncasecmp( p_input->psz_uri, "file://", 7 ) ) if( p_input->psz_uri && !strncasecmp( p_input->psz_uri, "file://", 7 ) )
{
menu.addAction( QIcon( ":/type/folder-grey" ), menu.addAction( QIcon( ":/type/folder-grey" ),
qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) ); qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
}
menu.addSeparator(); menu.addSeparator();
} }
if( canEdit() ) if( canEdit() )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment