Bug 1643673 - Guard against a null default application. r=tkikuchi
authorJared Wein <jwein@mozilla.com>
Fri, 05 Jun 2020 18:19:12 +0000
changeset 534192 b9d9cb83485d6e256b94d1ff0fac2841f2d84e9e
parent 534191 c272f2f9aaac50f5d8003ea35bd5b13c7908e697
child 534193 27ae032f17be210a24da0aa3b438ef055bf14d43
push id37484
push userdluca@mozilla.com
push dateSat, 06 Jun 2020 09:46:03 +0000
treeherdermozilla-central@6237102f005d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstkikuchi
bugs1643673
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1643673 - Guard against a null default application. r=tkikuchi Differential Revision: https://phabricator.services.mozilla.com/D78551
uriloader/exthandler/win/nsMIMEInfoWin.cpp
--- a/uriloader/exthandler/win/nsMIMEInfoWin.cpp
+++ b/uriloader/exthandler/win/nsMIMEInfoWin.cpp
@@ -89,17 +89,18 @@ NS_IMETHODIMP
 nsMIMEInfoWin::LaunchWithFile(nsIFile* aFile) {
   nsresult rv;
 
   // it doesn't make any sense to call this on protocol handlers
   NS_ASSERTION(mClass == eMIMEInfo,
                "nsMIMEInfoBase should have mClass == eMIMEInfo");
 
   if (mPreferredAction == useSystemDefault) {
-    if (StaticPrefs::browser_pdf_launchDefaultEdgeAsApp()) {
+    if (mDefaultApplication &&
+        StaticPrefs::browser_pdf_launchDefaultEdgeAsApp()) {
       // Since Edgium is the default PDF handler, if we're using the OS default
       // and it's Edgium prefer it's app mode so it operates as a PDF viewer
       // (without browser toolbars). Bug 1632277.
       bool isPdf;
       rv = IsPdf(&isPdf);
       if (NS_SUCCEEDED(rv) && isPdf) {
         nsAutoCString defaultAppExecutable;
         rv = mDefaultApplication->GetNativeLeafName(defaultAppExecutable);