summaryrefslogtreecommitdiff
path: root/navit/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/map.c')
-rw-r--r--navit/map.c7
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