[pitivi] MainWindow: Don't assume get_uri() returns a string.



commit f1d4a5cb22a3e3e3fc5e3d6fb73090185a4a1327
Author: Edward Hervey <bilboed bilboed com>
Date:   Tue May 19 21:05:22 2009 +0200

    MainWindow: Don't assume get_uri() returns a string.
---
 pitivi/ui/mainwindow.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 1b0e9fe..c4a5610 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -703,8 +703,9 @@ class PitiviMainWindow(gtk.Window, Loggable):
 
         if response == gtk.RESPONSE_OK:
             self.log("User chose a URI to save project to")
-            new = unquote(chooser.get_uri())
-            formatter.addMapping(uri, new)
+            new = chooser.get_uri()
+            if new:
+                formatter.addMapping(uri, unquote(new))
         else:
             self.log("User didn't choose a URI to save project to")
             # FIXME: not calling addMapping doesn't keep the formatter from



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