From 21e677346db19295162f31947b05bb51dbf1a8d6 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 9 Nov 2010 17:37:51 -0500 Subject: [PATCH] Fix bug. --- common/content/editor.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common/content/editor.js b/common/content/editor.js index 7760fcf4..c00242ae 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -382,9 +382,14 @@ const Editor = Module("editor", { if (elem instanceof Element) return elem.QueryInterface(Ci.nsIDOMNSEditableElement).editor; - return elem.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIEditingSession) - .getEditorForWindow(elem); + try { + return elem.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIEditingSession) + .getEditorForWindow(elem); + } + catch (e) { + return null; + } }, getController: function () {