X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=ce9a86bfddb8b525a19ecefe27d443bb803a8d01;hp=65478b8a30c4ec217c293c95675d0090afa25dba;hb=fc3a3be33716675a4169ab4265a28250764b283d;hpb=024cdf8e3c2e6dd54687c814703e800788b2eebc diff --git a/lib/database.cc b/lib/database.cc index 65478b8a..ce9a86bf 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -726,7 +726,8 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch, /* Carefully avoid adding any self-referential in-reply-to term. */ in_reply_to_message_id = _parse_message_id (message, in_reply_to, NULL); - if (strcmp (in_reply_to_message_id, + if (in_reply_to_message_id && + strcmp (in_reply_to_message_id, notmuch_message_get_message_id (message))) { _notmuch_message_add_term (message, "replyto",