From 0cae88bcd346990eea568d27df9efc719fc63d2b Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 12 Aug 2011 12:08:18 +0200 Subject: [PATCH] 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. --- xoptions.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 -- 1.7.0.4