From 97af74459b6b158f287cb0510bba6e2689a7615b Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Tue, 8 Jan 2013 17:04:00 +0400
Subject: [PATCH 1/3] winspool.drv: Ignore pDevModeInput if fMode not equal
 DM_IN_BUFFER.

---
 dlls/winspool.drv/info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 60b621e..31bc4eb 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -2397,7 +2397,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) {
-- 
1.7.12.4
