( PLModel::childrenCount() > 0 ) is not equivalent to (
playlist_item_t*->i_children > -1 ). This patch swaps former for latter
which is a correct strict check wether an item is node.
Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>
}
else
{
- if ( (item->childCount() > 0) &&
+ PL_LOCK;
+ playlist_item_t *plItem =
+ playlist_ItemGetById( p_playlist, item->i_id );
+ if ( plItem && ( plItem->i_children > -1 ) &&
( rootItem->p_input == pl_input ||
rootItem->p_input == ml_input ) )
flags |= Qt::ItemIsDropEnabled;
+ PL_UNLOCK;
flags |= Qt::ItemIsDragEnabled;
}