Commit 4543c9c8 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

Qt: standardpanel: fix potential null dereference

parent 67a96ef7
...@@ -786,10 +786,13 @@ void StandardPLPanel::activate( const QModelIndex &index ) ...@@ -786,10 +786,13 @@ void StandardPLPanel::activate( const QModelIndex &index )
{ {
playlist_Lock( THEPL ); playlist_Lock( THEPL );
playlist_item_t *p_item = playlist_ItemGetById( THEPL, model->itemId( index, PLAYLIST_ID ) ); playlist_item_t *p_item = playlist_ItemGetById( THEPL, model->itemId( index, PLAYLIST_ID ) );
p_item->i_flags |= PLAYLIST_SUBITEM_STOP_FLAG; if ( p_item )
lastActivatedPLItemId = p_item->i_id; {
p_item->i_flags |= PLAYLIST_SUBITEM_STOP_FLAG;
lastActivatedPLItemId = p_item->i_id;
}
playlist_Unlock( THEPL ); playlist_Unlock( THEPL );
if ( index.isValid() ) if ( p_item && index.isValid() )
model->activateItem( index ); model->activateItem( index );
} }
} }
......
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