diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index 6d77bf955938..5623f30e5f25 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -5191,8 +5191,8 @@ void nsGlobalWindowOuter::PrintOuter(ErrorResult& aError) { nsCOMPtr printSettingsService = do_GetService("@mozilla.org/gfx/printsettings-service;1"); - nsCOMPtr printSettings; if (printSettingsService) { + nsCOMPtr printSettings; printSettingsService->GetGlobalPrintSettings( getter_AddRefs(printSettings)); @@ -5223,9 +5223,6 @@ void nsGlobalWindowOuter::PrintOuter(ErrorResult& aError) { EnterModalState(); webBrowserPrint->Print(printSettings, nullptr); LeaveModalState(); - } else { - webBrowserPrint->GetGlobalPrintSettings(getter_AddRefs(printSettings)); - webBrowserPrint->Print(printSettings, nullptr); } } #endif // NS_PRINTING