[vlmc-devel] [PATCH] Fix crash in TracksView::dragLeaveEvent when dragging no-audio clip

Evgeni Bikov bikovevg at gmail.com
Sat Jun 4 16:16:21 CEST 2016


---
 src/Gui/timeline/TracksView.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 1faabc8..e98fa95 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -780,9 +780,10 @@ TracksView::dragLeaveEvent( QDragLeaveEvent *event )
     bool updateDurationNeeded = false;
     if ( m_dragAudioItem || m_dragVideoItem )
         updateDurationNeeded = true;
-
-    Core::instance()->workflow()->deleteClip( m_dragAudioItem->clip()->uuid() );
-    Core::instance()->workflow()->deleteClip( m_dragVideoItem->clip()->uuid() );
+    if ( m_dragAudioItem )
+        Core::instance()->workflow()->deleteClip( m_dragAudioItem->clip()->uuid() );
+    if ( m_dragVideoItem )
+        Core::instance()->workflow()->deleteClip( m_dragVideoItem->clip()->uuid() );
 
     delete m_dragAudioItem;
     delete m_dragVideoItem;
-- 
1.9.1



More information about the Vlmc-devel mailing list