move testing for no options to back-end
[xboard.git] / dialogs.c
index c4971d4..6287a91 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -48,6 +48,7 @@ extern char *getenv();
 #include <stdint.h>
 
 #include "common.h"
+#include "frontend.h"
 #include "backend.h"
 #include "xboard.h"
 #include "menus.h"
@@ -1173,6 +1174,7 @@ BoxAutoPopUp (char *buf)
 void
 SettingsPopUp (ChessProgramState *cps)
 {
+   if(!cps->nrOptions) { DisplayNote(_("Engine has no options")); return; }
    currentCps = cps;
    GenericPopUp(cps->option, _("Engine Settings"), TransientDlg, BoardWindow, MODAL, 0);
 }