[vlmc-devel] commit: timeline: avoid potential crash (Ludovic Fauvet )
git at videolan.org
git at videolan.org
Tue Mar 23 12:25:07 CET 2010
vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Tue Mar 23 10:33:22 2010 +0100| [4447474696f9d1841cb37de6c8503d522059434f] | committer: Ludovic Fauvet
timeline: avoid potential crash
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=4447474696f9d1841cb37de6c8503d522059434f
---
src/Gui/timeline/TracksView.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 9e33506..e0bd2a3 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -381,8 +381,8 @@ TracksView::moveMediaItem( const QUuid &uuid, unsigned int track, qint64 time )
void
TracksView::moveMediaItem( AbstractGraphicsMediaItem *item, QPoint position )
{
- static GraphicsTrack *lastKnownTrack = NULL;
GraphicsTrack *track = NULL;
+ static GraphicsTrack *lastKnownTrack = getTrack( MainWorkflow::VideoTrack, 0 );
QList<QGraphicsItem*> list = items( 0, position.y() );
for ( int i = 0; i < list.size(); ++i )
@@ -397,7 +397,7 @@ TracksView::moveMediaItem( AbstractGraphicsMediaItem *item, QPoint position )
// use the last known track.
// This avoids "breaks" when moving a rush
if ( !lastKnownTrack )
- lastKnownTrack = getTrack( MainWorkflow::VideoTrack, 0 );
+ return;
track = lastKnownTrack;
}
More information about the Vlmc-devel
mailing list