Fix:core:Check for nullpointer before remove refcounts in map_destroy
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 May 2011 22:09:08 +0000 (22:09 +0000)
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 May 2011 22:09:08 +0000 (22:09 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4460 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/map.c

index d8ca5e3..94df1e9 100644 (file)
@@ -276,6 +276,9 @@ map_destroy_do(struct map *m)
 void
 map_destroy(struct map *m)
 {
+       if (!m)
+               return;
+
        if(0<m->refcount) {
                m->refcount--;
        }