diff --git a/mozilla/toolkit/content/contentAreaUtils.js b/mozilla/toolkit/content/contentAreaUtils.js index dd2691c9dac..57063dea738 100644 --- a/mozilla/toolkit/content/contentAreaUtils.js +++ b/mozilla/toolkit/content/contentAreaUtils.js @@ -721,10 +721,12 @@ function getMIMETypeForURI(aURI) function getMIMEInfoForType(aMIMEType, aExtension) { - try { - return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension); - } - catch (e) { + if (aMIMEType || aExtension) { + try { + return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension); + } + catch (e) { + } } return null; }