From c5773e8f199fdab542c8830a644fd00932b1c262 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 19 Oct 2010 12:45:55 +0000 Subject: fix error writing file if there are not a url in the location bar --- diff --git a/browser.py b/browser.py index 8e1dab5..7b0ec1d 100644 --- a/browser.py +++ b/browser.py @@ -300,6 +300,8 @@ class Browser(WebView): """ get a nsIURI object and return a string with the url """ + if uri == None: + return '' cls = components.classes['@mozilla.org/intl/texttosuburi;1'] texttosuburi = cls.getService(interfaces.nsITextToSubURI) return texttosuburi.unEscapeURIForUI(uri.originCharset, uri.spec) -- cgit v0.9.1