From 7c809f711c5b9386c71109bc3b34ebcd6084ecdf Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Mon, 1 Apr 2013 16:52:14 +0400
Subject: [PATCH] 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 27a6edd..d5b6807 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.8.1.5
