diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-11-12 14:57:01 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-11-12 14:57:01 +0000 |
commit | 5446b4bd4135bf143c029830500084579839188e (patch) | |
tree | cb42924148db9d9a1e488d2f1c1edf477642fd9b /navit/map.c | |
parent | 09a15a234a449bb35cbdce331ce780de5e4712e0 (diff) | |
download | navit-5446b4bd4135bf143c029830500084579839188e.tar.gz |
Fix:Core:Better diagnostics and no crash in case of fopen problems
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2743 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/map.c')
-rw-r--r-- | navit/map.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/navit/map.c b/navit/map.c index b7b2b7b91..c14d2b45a 100644 --- a/navit/map.c +++ b/navit/map.c @@ -654,8 +654,11 @@ map_dump_file(struct map *map, const char *file) { FILE *f; f=fopen(file,"w"); - map_dump_filedesc(map, f); - fclose(f); + if (f) { + map_dump_filedesc(map, f); + fclose(f); + } else + dbg(0,"failed to open file '%s'\n",file); } void |