diff --git a/mozilla/extensions/irc/xul/content/config.js b/mozilla/extensions/irc/xul/content/config.js index 30a98fcd50f..852172f7c3c 100755 --- a/mozilla/extensions/irc/xul/content/config.js +++ b/mozilla/extensions/irc/xul/content/config.js @@ -1384,7 +1384,16 @@ function pwin_onPrefBrowse(button) var rv; if (type == "folder") { - var current = getFileFromURLSpec(edit.value); + try + { + // if the user set the pref to an invalid folder, this will throw: + var current = getFileFromURLSpec(edit.value); + } + catch (ex) + { + // Just setting it to null will work: + current = null; + } rv = pickGetFolder(MSG_PREFS_BROWSE_TITLE, current); } else