Commit d1c5be68 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

TracksView: check for track existance before using it when removing item.

parent 09b2dc62
......@@ -586,9 +586,13 @@ TracksView::findPosition( AbstractGraphicsMediaItem *item, quint32 track, qint64
}
void
TracksView::removeMediaItem( const QUuid &uuid, unsigned int track, MainWorkflow::TrackType trackType )
TracksView::removeMediaItem( const QUuid &uuid, unsigned int trackId, MainWorkflow::TrackType trackType )
{
QList<QGraphicsItem*> trackItems = getTrack( trackType, track )->childItems();;
GraphicsTrack *track = getTrack( trackType, trackId );
if ( track == NULL )
return ;
QList<QGraphicsItem*> trackItems = track->childItems();;
for ( int i = 0; i < trackItems.size(); ++i )
{
......
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