From: H.G.Muller Date: Fri, 11 Mar 2016 14:54:45 +0000 (+0100) Subject: Fix segfault on single-line help text X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=268c91aade57484e5e2e4cd72114c8cf49865fc9 Fix segfault on single-line help text The help text itself is displayed in the ErrorPopUp as a label, and allowing help clicks on a label would apparently trigger some nfinite recursion of event handlers. Making labels in the ErrorDlg not sensitive to help clicks solved this. --- diff --git a/gtk/xoptions.c b/gtk/xoptions.c index e1ea664..e796d7f 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1486,7 +1486,7 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); label = frame; } gtk_widget_set_size_request(label, option[i].max ? option[i].max : -1, -1); - if(option[i].target || !strchr(option[i].name, '\n')) { // allow user to specify event handler for button presses + if(option[i].target || dlgNr != ErrorDlg &&!strchr(option[i].name, '\n')) { // allow user to specify event handler for button presses button = gtk_event_box_new(); gtk_container_add(GTK_CONTAINER(button), label); label = button;