]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
lib: Handle empty date value
[notmuch] / lib / message.cc
index bbfc2500bd92f12dfade22db471fb6b22bf9613b..38bc92914163bc92441ee05f8aede64a65d3efca 100644 (file)
@@ -896,6 +896,9 @@ notmuch_message_get_date (notmuch_message_t *message)
        return 0;
     }
 
+    if (value.empty ())
+       /* sortable_unserialise is undefined on empty string */
+       return 0;
     return Xapian::sortable_unserialise (value);
 }