From 40320f3e7e750d7ed33e0690f0572ce878e19fba Mon Sep 17 00:00:00 2001
From: Gerard Patel <g.patel@wanadoo.fr>
Date: Sun, 15 Aug 1999 16:33:11 +0000
Subject: [PATCH] Fix special case when no printer installed.

---
 dlls/commdlg/printdlg.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c
index d8be52509bc..ff5749461bd 100644
--- a/dlls/commdlg/printdlg.c
+++ b/dlls/commdlg/printdlg.c
@@ -211,6 +211,11 @@ BOOL WINAPI PrintDlgA(
      * and return PDERR_NODEFAULTPRN
      */
     /* FIXME: not implemented yet!!! */
+    if (!PrintStructures.NrOfPrinterInfoEntries)
+    {
+        COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN);
+        return FALSE;
+    }
     PrintStructures.CurrentPrinter=0; 
     PrintStructures.DefaultPrinter=0; 
      
-- 
GitLab