From: Jeffrey Altman Date: Fri, 19 Nov 2010 05:07:36 +0000 (-0500) Subject: Windows: conditionally set tray icon state X-Git-Tag: upstream/1.8.0_pre1^2~4492 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4affa40db8c6c2c9908a77101ee001c3762f9593;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/WINNT/client_config/tab_general.cpp b/src/WINNT/client_config/tab_general.cpp index f50c12007..4994c2b45 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) {