From: H.G. Muller Date: Fri, 12 Aug 2011 10:08:18 +0000 (+0200) Subject: Fix generic-popup failure after empty engine-settings dialog X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0cae88bcd346990eea568d27df9efc719fc63d2b;p=xboard.git Fix generic-popup failure after empty engine-settings dialog The error exit ofthe Engine #N Settings dialog in case of an engine without options forgot to clear currentCps, with as a result that the generic popup thought every subsequent popup was an empty one, and kept repeating the 'engine has no options' error message for every dialog. --- diff --git a/xoptions.c b/xoptions.c index d6b5b92..d936f06 100644 --- a/xoptions.c +++ b/xoptions.c @@ -934,7 +934,7 @@ GenericPopUp(Option *option, char *title, int dlgNr) if(currentCps) { // Settings popup for engine: format through heuristic int n = currentCps->nrOptions; - if(!n) { DisplayNote(_("Engine has no options")); return 0; } + if(!n) { DisplayNote(_("Engine has no options")); currentCps = NULL; return 0; } if(n > 50) width = 4; else if(n>24) width = 2; else width = 1; height = n / width + 1; if(n && (currentOption[n-1].type == Button || currentOption[n-1].type == SaveButton)) currentOption[n].min = 1; // OK on same line