Bug 1242295 - Fix compile error in nsDeviceContextSpecWin. r?jimm
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -439,17 +439,18 @@ nsPrinterEnumeratorWin::InitPrintSetting
devSpecWin->GetDevMode(devmode);
if (NS_WARN_IF(!devmode)) {
return NS_ERROR_FAILURE;
}
aPrintSettings->SetPrinterName(aPrinterName);
// We need to get information from the device as well.
- HDC dc = ::CreateICW(kDriverName, aPrinterName, nullptr, devmode);
+ char16ptr_t printerName = aPrinterName;
+ HDC dc = ::CreateICW(kDriverName, printerName, nullptr, devmode);
if (NS_WARN_IF(!dc)) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPrintSettingsWin> psWin = do_QueryInterface(aPrintSettings);
MOZ_ASSERT(psWin);
psWin->CopyFromNative(dc, devmode);
::DeleteDC(dc);