- check validity before using iterators
- don't use iterator anymore once the item is erased
return;
Iterator it = findById( m_currentItem->i_id );
- it->m_playing = false;
+ if( it != end() )
+ it->m_playing = false;
m_currentItem = NULL;
}
else
}
Iterator it = findById( current->i_id );
- it->m_playing = true;
+ if( it != end() )
+ it->m_playing = true;
m_currentItem = current;
playlist_Unlock( m_pPlaylist );
Iterator item = findById( i_id ) ;
if( item != end() )
{
- if( item->parent() )
- item->parent()->removeChild( item );
- descr.b_visible = item->parent() ? item->parent()->m_expanded : true;
+ VarTree* parent = item->parent();
+ if( parent )
+ parent->removeChild( item );
+
+ descr.b_visible = parent ? parent->m_expanded : true;
notify( &descr );
}
}