Hi, I posted this mail a week ago but there was no response... I'm sending
it again, just in case you haven't noticed the previous one :)
Best regards,
alex.
-------------------------------------------------------------------
* typing a filename in the file open/save dialog box
made an incorect save of the current_path, corrected
* deleting the Blank Split caused a coredump.
this is due to the fact that there exists a pointer to the Blank
split in the SplitRegister object (user_hook), that is left in place
when the split is deleted. The code tries later to use that split, since
the test is user_hook != NULL.
The solution is to check whether the deleted split is the Blank split,
and refuse to delete it.
diff -r -u -B xacc/src/motif/FileBox.c my-xacc/src/motif/FileBox.c
--- xacc/src/motif/FileBox.c Thu Jan 21 09:48:25 1999
+++ my-xacc/src/motif/FileBox.c Sun Feb 28 16:52:02 1999
@@ -27,6 +27,9 @@
#include <Xm/Xm.h>
#include <Xm/FileSB.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include "config.h"
#include "FileBox.h"
@@ -159,11 +162,17 @@
* time they get to this box.
*/
if (fileName) {
- char *slash;
- if (previous_path) free (previous_path);
- previous_path = strdup (fileName);
- slash = strrchr (previous_path, '/');
+ char *slash, *new_path;
+ struct stat s;
+
+ new_path = strdup (fileName);
+ slash = strrchr (new_path, '/');
if (slash) { *(slash+1) = 0x0; }
+ if((0 == stat(new_path, &s)) && S_ISDIR(s.st_mode)) {
+ if (previous_path) free (previous_path);
+ previous_path = new_path;
+ } else
+ free(new_path);
}
LEAVE("fileBox");
diff -r -u -B xacc/src/motif/RegWindow.c my-xacc/src/motif/RegWindow.c
--- xacc/src/motif/RegWindow.c Wed Feb 3 11:53:25 1999
+++ my-xacc/src/motif/RegWindow.c Sun Feb 28 17:24:27 1999
@@ -921,6 +921,8 @@
/* get the current split based on cursor position */
split = xaccSRGetCurrentSplit (regData->ledger->ledger);
+ /* we don't delete the blank split */
+ if(split == regData->ledger->ledger->user_hook) return;
if (NULL == split ) return;
/* ask for user confirmation before performing