From c97ec074977563b756e9ad1c9773c5880965c664 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 19 Nov 2010 00:07:36 -0500 Subject: [PATCH] Windows: conditionally set tray icon state If the checkbox IDC_TRAYICON is not present in the dialog, do not attempt to use its value as a setting for Config_SetTrayIconFlag(). FIXES 128591 Change-Id: Iff5ef4993f082e73cca93e79d17f49cc15b6264f Reviewed-on: http://gerrit.openafs.org/3331 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4207 --- src/WINNT/client_config/tab_general.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/WINNT/client_config/tab_general.cpp b/src/WINNT/client_config/tab_general.cpp index f97caf7a8..9cef8bc06 100644 --- a/src/WINNT/client_config/tab_general.cpp +++ b/src/WINNT/client_config/tab_general.cpp @@ -266,11 +266,12 @@ BOOL GeneralTab_OnApply (HWND hDlg, BOOL fForce, BOOL fComplainIfInvalid) BOOL fLogonAuthent = IsDlgButtonChecked (hDlg, IDC_LOGON); if (fLogonAuthent != g.Configuration.fLogonAuthent) { - SetBitLogonOption(fLogonAuthent,LOGON_OPTION_INTEGRATED); + SetBitLogonOption(fLogonAuthent,LOGON_OPTION_INTEGRATED); g.Configuration.fLogonAuthent = fLogonAuthent; } - Config_SetTrayIconFlag (IsDlgButtonChecked (hDlg, IDC_TRAYICON)); + if (GetDlgItem(hDlg, IDC_TRAYICON) != NULL) + Config_SetTrayIconFlag (IsDlgButtonChecked(hDlg, IDC_TRAYICON)); if (g.fIsWinNT) { -- 2.39.5