X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Ffilenames.c;h=63e737dd4edc2c93d254249f0d5dd807b44b008a;hb=11fda0bf2fd74b227d15a2bb6b36a8ce6403c8e9;hp=f1ea243012095d19eccf334e54e02ade3b59c089;hpb=f3c1eebfaf8526129ae6946cbcd44a3c602563d6;p=notmuch diff --git a/lib/filenames.c b/lib/filenames.c index f1ea2430..63e737dd 100644 --- a/lib/filenames.c +++ b/lib/filenames.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/ . + * along with this program. If not, see https://www.gnu.org/licenses/ . * * Author: Carl Worth */ @@ -54,7 +54,7 @@ notmuch_filenames_valid (notmuch_filenames_t *filenames) const char * notmuch_filenames_get (notmuch_filenames_t *filenames) { - if (filenames->iterator == NULL) + if ((filenames == NULL) || (filenames->iterator == NULL)) return NULL; return filenames->iterator->string; @@ -63,7 +63,7 @@ notmuch_filenames_get (notmuch_filenames_t *filenames) void notmuch_filenames_move_to_next (notmuch_filenames_t *filenames) { - if (filenames->iterator == NULL) + if ((filenames == NULL) || (filenames->iterator == NULL)) return; filenames->iterator = filenames->iterator->next;