fix segmentation fault in faceplate if EPICS_DISPLAY_PATH not set
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-DM2K/dm2kApp/dm2k/faceplateGUI.c new-DM2K/dm2kApp/dm2k/faceplateGUI.c
--- old-DM2K/dm2kApp/dm2k/faceplateGUI.c 2022-06-25 21:30:21.908166344 +0200
+++ new-DM2K/dm2kApp/dm2k/faceplateGUI.c 2022-06-25 21:30:21.908166344 +0200
@@ -1584,6 +1584,7 @@
char * adlDir = getenv(DISPLAY_LIST_ENV);
+ char dirMask[FULLPATHNAME_SIZE+1];
if (fGUI->wAdlSelectDlg != NULL) {
XtManageChild(fGUI->wAdlSelectDlg);
return;
@@ -1596,8 +1597,6 @@
ac = 0;
if (adlDir != NULL) {
- char dirMask[FULLPATHNAME_SIZE+1];
-
sprintf(dirMask, "%s%s", adlDir, DISPLAY_DIALOG_MASK);
xmstrings[0] = XmStringCreateLtoR ( dirMask, (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
XtSetArg(al[ac], XmNdirMask, xmstrings[0]); ac++;
@@ -1616,10 +1615,12 @@
fillFileSelBox(fGUI->wAdlSelectDlg);
ac = 0;
- XmStringFree ( xmstrings [ 0 ] );
- XmStringFree ( xmstrings [ 1 ] );
- XmStringFree ( xmstrings [ 2 ] );
- XmStringFree ( xmstrings [ 3 ] );
+ if (adlDir != NULL) {
+ XmStringFree ( xmstrings [ 0 ] );
+ XmStringFree ( xmstrings [ 1 ] );
+ XmStringFree ( xmstrings [ 2 ] );
+ XmStringFree ( xmstrings [ 3 ] );
+ }
button29 = XmSelectionBoxGetChild ( fGUI->wAdlSelectDlg, XmDIALOG_CANCEL_BUTTON );
XtDestroyWidget(XmSelectionBoxGetChild ( fGUI->wAdlSelectDlg, XmDIALOG_HELP_BUTTON ));
button31 = XmSelectionBoxGetChild ( fGUI->wAdlSelectDlg, XmDIALOG_OK_BUTTON );
patch cb64cfa4506b441e3f9558a7909095aa642bc15f
Author: christoph.schroeder@helmholtz-berlin.de
Date: Fri Oct 19 14:23:48 CEST 2018
* fix segmentation fault in faceplate if EPICS_DISPLAY_PATH not se