[PATCH v2] conhost: Don't compare the console config if the user cancels the dialog

Hugh McMaster hugh.mcmaster at outlook.com
Wed Mar 2 06:54:19 CST 2022


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
Changes in v2: Handle cancel and error return codes

 programs/conhost/window.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index 33ffb3915ed..abfc791c1ef 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -2036,7 +2036,8 @@ static BOOL config_dialog( struct console *console, BOOL current )
     header.hwndParent = console->win;
     header.u3.phpage  = pages;
     header.dwFlags    = PSH_NOAPPLYNOW;
-    PropertySheetW( &header );
+    if (PropertySheetW( &header ) < 1)
+        return TRUE;
 
     if (!memcmp( &prev_config, &di.config, sizeof(prev_config) ))
         return TRUE;
-- 
2.35.1




More information about the wine-devel mailing list