summaryrefslogtreecommitdiff
path: root/navit/atom.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-10-07 11:00:12 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-10-07 11:00:12 +0000
commitdb82699c43387cc6d3e570fbea2ac5dae545f04d (patch)
tree159378dd972139e5c6573b33d743d04b19494310 /navit/atom.c
parent78bbe925e1b05d5b1671660c3264948abc8ca7e4 (diff)
downloadnavit-db82699c43387cc6d3e570fbea2ac5dae545f04d.tar.gz
Fix:Core:Avoid errors while running osm2navit
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2644 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/atom.c')
-rw-r--r--navit/atom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/navit/atom.c b/navit/atom.c
index d22579759..de11ce8bc 100644
--- a/navit/atom.c
+++ b/navit/atom.c
@@ -6,6 +6,8 @@ static GHashTable *atom_hash;
char *
atom_lookup(char *name)
{
+ if (!atom_hash)
+ return NULL;
return g_hash_table_lookup(atom_hash,name);
}
@@ -15,6 +17,8 @@ atom(char *name)
char *id=atom_lookup(name);
if (id)
return id;
+ if (!atom_hash)
+ return NULL;
id=g_strdup(name);
g_hash_table_insert(atom_hash, id, id);
return id;