[pitivi] timeline: Fix case where we do not have VideoSource in a clip



commit 16216e09923515b15f751e35a0e25a89f95fe846
Author: Thibault Saunier <tsaunier gnome org>
Date:   Fri Apr 1 12:22:44 2016 +0200

    timeline: Fix case where we do not have VideoSource in a clip
    
    Otherwise we will try to update a None source position...

 pitivi/timeline/timeline.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index d29745a..877fdc3 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -602,7 +602,8 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
                 duration = clip.get_duration()
                 if start <= position <= duration + start:
                     source = clip.find_track_element(None, GES.VideoSource)
-                    sources.append(source)
+                    if source:
+                        sources.append(source)
                     continue
         return sources
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]