From: H.G. Muller Date: Sat, 9 Apr 2011 18:55:47 +0000 (+0200) Subject: Fix crash on opening ICS Text Menu X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1af94b4e59fd00cc7da15ec5738ac87b7836ca09;p=xboard.git Fix crash on opening ICS Text Menu The patch for the color defaults had broken the ICS Text Menu. --- diff --git a/xoptions.c b/xoptions.c index 16576f9..5bb51a4 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1276,6 +1276,7 @@ void GenericReadout() case Button: case SaveButton: case Label: + case Break: break; } if(currentOption[i].type == EndMark) break; @@ -1493,7 +1494,7 @@ GenericPopUp(Option *option, char *title, int dlgNr) } option[i].handle = (void*) (dialog = last = XtCreateManagedWidget(option[i].name, commandWidgetClass, form, args, j)); - if(option[i].choice && !currentCps) { + if(option[i].choice && ((char*)option[i].choice)[0] == '#' && !currentCps) { SetColor( *(char**) option[i-1].target, last); XtAddEventHandler(option[i-1].handle, KeyReleaseMask, False, ColorChanged, (XtPointer)(intptr_t) i-1); } @@ -1888,7 +1889,7 @@ extern char ICSInputTranslations[]; char *icsText; Option boxOptions[] = { -{ 0, 20, 400, NULL, (void*) &icsText, "", NULL, TextBox, "" }, +{ 0, 30, 400, NULL, (void*) &icsText, "", NULL, TextBox, "" }, { 0, 3, 0, NULL, NULL, "", NULL, EndMark , "" } };