From d2feaeb247df48ac8539ab7f539ad278eea24f26 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 18 Apr 2011 20:58:01 +0200 Subject: [PATCH] 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. --- xboard.c | 6 ++++-- xoptions.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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) -- 1.7.0.4