]> git.cworth.org Git - notmuch/blobdiff - lib/tags.c
lib/tag: handle NULL argument to notmuch_tags_valid
[notmuch] / lib / tags.c
index c7d3f66f491b5ec02495817ba85b6c6981c5fc6d..ec5366ffa23681bf4ddd37a576b2ee202199b737 100644 (file)
@@ -48,7 +48,7 @@ _notmuch_tags_create (const void *ctx, notmuch_string_list_t *list)
 notmuch_bool_t
 notmuch_tags_valid (notmuch_tags_t *tags)
 {
-    return tags->iterator != NULL;
+    return tags && (tags->iterator != NULL);
 }
 
 const char *