X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/df91c16943aa4f5c47452fa7d21e65df2d9e315b..6a833a6e83865f6999707cc30768d07e1351c2cb:/lib/filenames.c 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;