From 3b3f44df5967cf69745f7fde4b9e7d4e0f883296 Mon Sep 17 00:00:00 2001 From: Scott Tringali Date: Fri, 29 Feb 2008 16:06:05 +0000 Subject: [PATCH] Fix crash when changing directories with a selected file. Thanks, Dale Whitfield! --- util/getfiles.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/getfiles.c b/util/getfiles.c index 7546df7..8ec1130 100644 --- a/util/getfiles.c +++ b/util/getfiles.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: getfiles.c,v 1.36 2006/08/22 13:23:02 yooden Exp $"; +static const char CVSID[] = "$Id: getfiles.c,v 1.37 2008/02/29 16:06:05 tringali Exp $"; /******************************************************************************* * * * Getfiles.c -- File Interface Routines * @@ -1108,6 +1108,10 @@ static void sortWidgetList(Widget listWidget) XmString *items, *sortedItems; int nItems, i; + /* OpenMotif 2.3 will crash if we try to replace the items, when they + are selected. This function is only called when we refresh the + contents anyway. */ + XmListDeselectAllItems(listWidget); XtVaGetValues(listWidget, XmNitems, &items, XmNitemCount, &nItems, NULL); sortedItems = (XmString *)XtMalloc(sizeof(XmString) * nItems); for (i=0; i