diff --git a/gfx/src/windows/nsDeviceContextSpecFactoryW.cpp b/gfx/src/windows/nsDeviceContextSpecFactoryW.cpp index 15280ced8c80..570f42b41186 100644 --- a/gfx/src/windows/nsDeviceContextSpecFactoryW.cpp +++ b/gfx/src/windows/nsDeviceContextSpecFactoryW.cpp @@ -573,6 +573,8 @@ NS_IMETHODIMP nsDeviceContextSpecFactoryWin :: CreateDeviceContextSpec(nsIWidget prntdlg.Flags = PD_ALLPAGES | PD_RETURNDEFAULT | PD_RETURNIC | PD_USEDEVMODECOPIESANDCOLLATE; } + rv = NS_ERROR_FAILURE; // reset + BOOL result = ::PrintDlg(&prntdlg); if (TRUE == result){ @@ -670,6 +672,9 @@ NS_IMETHODIMP nsDeviceContextSpecFactoryWin :: CreateDeviceContextSpec(nsIWidget ::GlobalUnlock(prntdlg.hDevNames); ::GlobalFree(prntdlg.hDevNames); } + } else { + // print dialog aborted + rv = NS_ERROR_ABORT; } return rv;