]> git.notmuchmail.org Git - notmuch/blobdiff - lib/filenames.c
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / lib / filenames.c
index f1ea243012095d19eccf334e54e02ade3b59c089..37d631d6ff311ba34c8a60124e30c564622e6072 100644 (file)
@@ -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 <cworth@cworth.org>
  */
@@ -46,7 +46,7 @@ notmuch_bool_t
 notmuch_filenames_valid (notmuch_filenames_t *filenames)
 {
     if (filenames == NULL)
-       return FALSE;
+       return false;
 
     return (filenames->iterator != NULL);
 }
@@ -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;