diff options
author | geoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-11-03 22:17:41 +0000 |
---|---|---|
committer | geoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-11-03 22:17:41 +0000 |
commit | 4ee6ff402cf33d7660f1c55ac48d80c28ad2033d (patch) | |
tree | 03856e58da2afafaaa997d39c762d8659c4eb801 /navit/bookmarks.c | |
parent | 555182df4f58706adcfe4635fec74228e0a4092d (diff) | |
download | navit-svn-4ee6ff402cf33d7660f1c55ac48d80c28ad2033d.tar.gz |
Fix:Core:Fixes an issue if the destination.txt file cannot be read as per ticket #959
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4845 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/bookmarks.c')
-rw-r--r-- | navit/bookmarks.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/navit/bookmarks.c b/navit/bookmarks.c index 30ffa9e8..40d1174f 100644 --- a/navit/bookmarks.c +++ b/navit/bookmarks.c @@ -684,7 +684,11 @@ bookmarks_append_coord(struct bookmarks *this_, char *file, struct pcoord *c, in bookmarks_shrink(file, offsets[offset_pos]); } f=fopen(file, "a"); - if (f) { + if (f == NULL) { + dbg(0, "Failed to open destination.txt for writing\n"); + return 0; + } + else if (f != NULL) { if (c) { int i; if (description) |