From e0b54d847df30503f20ed3d91ce5f43aea2fec9b Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Wed, 3 Apr 2013 17:36:45 +0400
Subject: [PATCH 2/2] winspool.drv: Check the value of pDeviceName.

---
 dlls/winspool.drv/info.c       | 2 +-
 dlls/winspool.drv/tests/info.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 27a6edd..acaa633 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -2345,7 +2345,7 @@ LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
 	hWnd,hPrinter,pDeviceName,pDevModeOutput,pDevModeInput,fMode
     );
 
-    if(!pDeviceName) {
+    if(!pDeviceName || !*pDeviceName) {
         LPCWSTR lpNameW = get_opened_printer_name(hPrinter);
         if(!lpNameW) {
 		ERR("no name from hPrinter?\n");
diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index 1de4c6a..c63bf90 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -2679,7 +2679,6 @@ static void test_DocumentProperties(void)
     ok(ret == IDOK, "DocumentProperties ret value %d != expected IDOK\n", ret);
 
     ret = DocumentProperties(0, hprn, "", dm, dm, DM_OUT_BUFFER);
-    todo_wine
     ok(ret == IDOK, "DocumentProperties ret value %d != expected IDOK\n", ret);
 
     test_DEVMODE(dm, dm_size, default_printer);
-- 
1.8.1.5
