Fix:Core:map_new might return a nullpointer, handle this case
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 May 2011 22:15:39 +0000 (22:15 +0000)
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 May 2011 22:15:39 +0000 (22:15 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4463 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/bookmarks.c

index c5f040c..584da6e 100644 (file)
@@ -243,6 +243,8 @@ bookmarks_new(struct attr *parent, struct attr **attrs, struct transformation *t
                struct attr type={attr_type, {"textfile"}}, data={attr_data, {this_->bookmark_file}};
                struct attr *attrs[]={&type, &data, NULL};
                this_->bookmark=map_new(this_->parent, attrs);
+               if (!this_->bookmark)
+                       return NULL;
                bookmarks_load_hash(this_);
        }