From: H.G. Muller Date: Mon, 18 Apr 2011 18:58:01 +0000 (+0200) Subject: Fix crash on using Engine #1 Settings in ICS non-zippy mode X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d2feaeb247df48ac8539ab7f539ad278eea24f26;p=xboard.git Fix crash on using Engine #1 Settings in ICS non-zippy mode If XBoard is compiled with zippy the Engine #1 Settings menu was not grayed out even when you don't run in zippy mode, and using it would then crash XBoard. --- diff --git a/xboard.c b/xboard.c index 449f5b3..bdd49b0 100644 --- a/xboard.c +++ b/xboard.c @@ -2790,8 +2790,8 @@ Enables icsEnables[] = { { "menuOptions.Hide Thinking", False }, { "menuOptions.Ponder Next Move", False }, #endif - { "menuEngine.Engine #1 Settings", False }, #endif + { "menuEngine.Engine #1 Settings", False }, { "menuEngine.Engine #2 Settings", False }, { "menuEdit.Annotate", False }, { NULL, False } @@ -2935,8 +2935,10 @@ void SetICSMode() SetMenuEnables(icsEnables); #if ZIPPY - if (appData.zippyPlay && !appData.noChessProgram) /* [DM] icsEngineAnalyze */ + if (appData.zippyPlay && !appData.noChessProgram) { /* [DM] icsEngineAnalyze */ XtSetSensitive(XtNameToWidget(menuBarWidget, "menuMode.Analysis Mode"), True); + XtSetSensitive(XtNameToWidget(menuBarWidget, "menuEngine.Engine #1 Settings"), True); + } #endif } diff --git a/xoptions.c b/xoptions.c index e8c8fcd..7cbd7e8 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1993,7 +1993,7 @@ void FirstSettingsProc(w, event, prms, nprms) String *prms; Cardinal *nprms; { - SettingsPopUp(&first); + SettingsPopUp(&first); } void SecondSettingsProc(w, event, prms, nprms)