X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=7de59125358598408b6d44ae306099584c13cc4b;hb=5b1f4e2d668d8cc065ce0f95f9bbcf09d9497036;hp=446cf156c58fe4cc6943e0f796f10429bc8c896b;hpb=97d28802c3f1166f64a2cc32da74d829a60d8243;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 446cf15..7de5912 100644 --- a/xoptions.c +++ b/xoptions.c @@ -220,13 +220,13 @@ CreateComboPopup (Widget parent, Option *option, int n) int i=0, j; Widget menu, entry; Arg args[16]; + char **mb = (char **) option->textValue; + if(mb[0] == NULL) return; // avoid empty menus, as they cause crash menu = XtCreatePopupShell(option->name, simpleMenuWidgetClass, parent, NULL, 0); j = 0; XtSetArg(args[j], XtNwidth, 100); j++; -// XtSetArg(args[j], XtNright, XtChainRight); j++; - char **mb = (char **) option->textValue; while (mb[i] != NULL) { if (option->min & NO_GETTEXT) @@ -1161,7 +1161,6 @@ GenericPopUp (Option *option, char *title, int dlgNr) XtSetArg(args[j], XtNleft, XtChainLeft); j++; XtSetArg(args[j], XtNright, XtChainLeft); j++; XtSetArg(args[j], XtNborderWidth, 0); j++; -printf("%d\n",textHeight); if(textHeight < 24) dialog = last; else dialog = XtCreateManagedWidget(" ", labelWidgetClass, form, args, j); j=0;