From 2a200751dd30fa72abaf6229c698918838de6eb4 Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Fri, 5 Apr 2013 11:41:29 +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 a7351fa..3990fb8 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -2680,7 +2680,6 @@ static void test_DocumentProperties(void)
     ok(ret == IDOK, "DocumentProperties ret value %d != expected IDOK\n", ret);
 
     ret = DocumentProperties(0, hprn, empty_str, 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
