[pitivi] progressdialog: Avoid to call progress.updatePosition when we destroyed progress



commit 338c8140b81bb4599d423deb1af57a4e2e6627c4
Author: Thibault Saunier <thibault saunier collabora co uk>
Date:   Wed May 18 12:16:17 2011 -0400

    progressdialog: Avoid to call progress.updatePosition when we destroyed progress

 pitivi/ui/encodingdialog.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index 95b3812..6339448 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -296,13 +296,15 @@ class EncodingDialog(GladeWindow, Renderer, Loggable):
         self.progress.setState(state)
 
     def updatePosition(self, fraction, text):
-        self.progress.updatePosition(fraction, text)
+        if self.progress:
+            self.progress.updatePosition(fraction, text)
 
     def updateUIOnEOS(self):
         """
         When a render completes or is cancelled, update the UI
         """
         self.progress.destroy()
+        self.progress = None
         self.window.show()  # Show the encoding dialog again
         self.pipeline.disconnect_by_function(self._stateChanged)
 



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