[pitivi] viewer: Avoid using uninitialized local variable
- From: Alexandru BÄluČ› <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] viewer: Avoid using uninitialized local variable
- Date: Sat, 8 Jul 2017 19:11:47 +0000 (UTC)
commit 2e1f4760b4a2124bab4cbdbe0b9f425177b93325
Author: Alexandru BÄluČ› <alexandru balut gmail com>
Date: Sun Apr 9 01:15:03 2017 +0200
viewer: Avoid using uninitialized local variable
Used the same mechanism as in the undock method.
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1719
pitivi/viewer/viewer.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/viewer/viewer.py b/pitivi/viewer/viewer.py
index 5d57376..6561a8a 100644
--- a/pitivi/viewer/viewer.py
+++ b/pitivi/viewer/viewer.py
@@ -378,6 +378,7 @@ class ViewerContainer(Gtk.Box, Loggable):
self.docked = True
self.settings.viewerDocked = True
+ position = None
if self.pipeline:
position = self.pipeline.getPosition()
self.pipeline.setState(Gst.State.NULL)
@@ -391,7 +392,7 @@ class ViewerContainer(Gtk.Box, Loggable):
self.show()
self.external_window.hide()
- if position:
+ if self.pipeline:
self.pipeline.pause()
self.pipeline.simple_seek(position)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]