Commit 2dc5dff3 authored by Jakob Leben's avatar Jakob Leben

qt4 playlist: fix crash at "vlc --no-media-library"

It's ugly, but it will do.
parent 74d8fc71
......@@ -132,18 +132,21 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
PLItem *item = index.isValid() ? getItem( index ) : rootItem;
input_item_t *pl_input = p_playlist->p_local_category->p_input;
input_item_t *ml_input = p_playlist->p_ml_category->p_input;
input_item_t *pl_input =
p_playlist->p_local_category ?
p_playlist->p_local_category->p_input : NULL;
input_item_t *ml_input =
p_playlist->p_ml_category ?
p_playlist->p_ml_category->p_input : NULL;
if( rootItem->i_id == p_playlist->p_root_onelevel->i_id
|| rootItem->i_id == p_playlist->p_root_category->i_id )
if( i_depth == DEPTH_SEL )
{
if( item->p_input == pl_input
|| item->p_input == ml_input)
if( ( pl_input && item->p_input == pl_input ) ||
( ml_input && item->p_input == ml_input ) )
flags |= Qt::ItemIsDropEnabled;
}
else if( rootItem->p_input == pl_input ||
rootItem->p_input == ml_input )
else if( ( pl_input && rootItem->p_input == pl_input ) ||
( ml_input && rootItem->p_input == ml_input ) )
{
PL_LOCK;
playlist_item_t *plItem =
......
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