From a79cc2f39fcd2618e4d66ca3762adddc5ec81411 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 23 Feb 2008 18:23:14 +0000 Subject: [PATCH] Fix:Tools:Fixed generation of country index tile when no data is available git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@909 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/src/osm2navit.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/navit/src/osm2navit.c b/navit/src/osm2navit.c index ffca1e2..8d119da 100644 --- a/navit/src/osm2navit.c +++ b/navit/src/osm2navit.c @@ -1761,12 +1761,14 @@ write_countrydir(int phase, int maxnamelen) struct country_table *co; for (i = 0 ; i < sizeof(country_table)/sizeof(struct country_table) ; i++) { co=&country_table[i]; - tilename[0]='\0'; - tile(&co->r, tilename, max); - sprintf(searchtile,"%ss%d", tilename, 0); - sprintf(filename,"country_%d.bin", co->countryid); - zipnum=add_aux_tile(phase, searchtile, filename, co->size); - index_country_add(phase,co->countryid,zipnum); + if (co->size) { + tilename[0]='\0'; + tile(&co->r, tilename, max); + sprintf(searchtile,"%ss%d", tilename, 0); + sprintf(filename,"country_%d.bin", co->countryid); + zipnum=add_aux_tile(phase, searchtile, filename, co->size); + index_country_add(phase,co->countryid,zipnum); + } } } #endif -- 2.7.4