From dbdd9dc72d7c0462fddc95324e7213fe10d5c2ec Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 19 Oct 2010 12:36:18 +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 3781e2e..0f3f51c 100644 --- a/browser.py +++ b/browser.py @@ -176,6 +176,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