winspool.drv: Avoid converting garbage if there was no DEVMODE passed in.

This commit is contained in:
Dmitry Timoshkov 2013-06-14 12:18:49 +09:00 committed by Alexandre Julliard
parent 08bade6880
commit aa0cc00b48
1 changed files with 1 additions and 1 deletions

View File

@ -2410,7 +2410,7 @@ LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
if(ret < 0) return ret;
pDevModeOutputA = HeapAlloc(GetProcessHeap(), 0, ret);
}
pDevModeInputA = DEVMODEdupWtoA(pDevModeInput);
pDevModeInputA = (fMode & DM_IN_BUFFER) ? DEVMODEdupWtoA(pDevModeInput) : NULL;
ret = DocumentPropertiesA(hWnd, hPrinter, pDeviceNameA, pDevModeOutputA,
pDevModeInputA, fMode);
if(pDevModeOutput) {