Commit c8e407da authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comdlg32: Explicitly compare to HRESULT values.

parent dbd93084
......@@ -4126,7 +4126,7 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd)
hr = E_FAIL;
lppd->hDevMode = update_devmode_handleA(lppd->hDevMode, dm);
if (!hr && lppd->hDevMode) {
if (hr == S_OK && lppd->hDevMode) {
if (lppd->Flags & PD_RETURNDC) {
lppd->hDC = CreateDCA(dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName, dm);
if (!lppd->hDC)
......@@ -4274,7 +4274,7 @@ HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd)
hr = E_FAIL;
lppd->hDevMode = update_devmode_handleW(lppd->hDevMode, dm);
if (!hr && lppd->hDevMode) {
if (hr == S_OK && lppd->hDevMode) {
if (lppd->Flags & PD_RETURNDC) {
lppd->hDC = CreateDCW(dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName, dm);
if (!lppd->hDC)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment