diff options
author | Daniel Carl <danielcarl@gmx.de> | 2013-05-27 19:24:36 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2013-05-27 19:24:36 +0200 |
commit | 6891a738faa9ef04d4594c93a12fb68cb4de3e11 (patch) | |
tree | 6caa1bc6c77a2ba6f0289e36f6d0aace95fad99c /src/bookmark.c | |
parent | 07f01099b2090efa480ef0bfa9df6c7ed409abe2 (diff) |
Fixed segfault and glib errors (#23).
Diffstat (limited to 'src/bookmark.c')
-rw-r--r-- | src/bookmark.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bookmark.c b/src/bookmark.c index 9e8c300..ab88aaf 100644 --- a/src/bookmark.c +++ b/src/bookmark.c @@ -58,11 +58,15 @@ void bookmark_add(const char *uri, const char *tags) */ GList *bookmark_get_by_tags(const char *tags) { - GList *res = NULL; - GList *src = load(vb.files[FILES_BOOKMARK]); + GList *res = NULL, *src = NULL; char **parts; unsigned int len; + if (!tags) { + return NULL; + } + + src = load(vb.files[FILES_BOOKMARK]); parts = g_strsplit(tags, " ", 0); len = g_strv_length(parts); |