X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/e04b18cf3624e1ba29a45cd1f15715e1da244021..c34effad9a65c2f2c6d4d25c508c201bad7a07f6:/mime-node.c 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)) {