From 4affa40db8c6c2c9908a77101ee001c3762f9593 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: Iebee8198ec25e1841f6fa49b9850a16329f2cbdd Reviewed-on: http://gerrit.openafs.org/3331 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- 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 f50c120..4994c2b 100644 --- a/src/WINNT/client_config/tab_general.cpp +++ b/src/WINNT/client_config/tab_general.cpp @@ -268,11 +268,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) { -- 1.9.4