X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=mime-node.c;h=839737a8b354df36cec7f0bcea9ca05188618fcb;hp=97e8b480271210db3489f74c3b17e10a139407f4;hb=b6b08e40b38b098e796c2846c150befc8cc2c350;hpb=2f40ca28a4d63df941525801735d05b5b2b86f91 diff --git a/mime-node.c b/mime-node.c index 97e8b480..839737a8 100644 --- a/mime-node.c +++ b/mime-node.c @@ -291,7 +291,7 @@ mime_node_child (mime_node_t *parent, int child) GMimeObject *sub; mime_node_t *node; - if (!parent || child < 0 || child >= parent->nchildren) + if (!parent || !parent->part || child < 0 || child >= parent->nchildren) return NULL; if (GMIME_IS_MULTIPART (parent->part)) {