[pitivi] previewers: Fix stacktrace when removing a clip
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] previewers: Fix stacktrace when removing a clip
- Date: Tue, 4 Feb 2014 21:51:32 +0000 (UTC)
commit 3fd9b9a2fe6b6f2a4d6251c2c2af487a2e2f071e
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Jan 6 09:27:38 2014 +0100
previewers: Fix stacktrace when removing a clip
Queued clip previewers which are waiting are removed from the queue and
everything is fine, but if the PreviewGeneratorManager starts to work on
a previewer and its clip is removed from the timeline, the previewer will
unset its pipeline attribute and an exception occurs.
pitivi/timeline/previewers.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index f2bdb74..8876026 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -263,6 +263,11 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
GLib.idle_add(self._startThumbnailing, priority=GLib.PRIORITY_LOW)
def _startThumbnailing(self):
+ if not self.pipeline:
+ # Can happen if stopGeneration is called because the clip has been
+ # removed from the timeline after the PreviewGeneratorManager
+ # started this job.
+ return
self.debug('Now generating thumbnails for: %s', filename_from_uri(self.uri))
query_success, duration = self.pipeline.query_duration(Gst.Format.TIME)
if not query_success or duration == -1:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]