Avoid potentially dereferencing a NULL pointer
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 24 Sep 2012 15:21:20 +0000 (17:21 +0200)
committerDavid Bremner <bremner@debian.org>
Thu, 27 Sep 2012 15:52:34 +0000 (12:52 -0300)
commitb6b08e40b38b098e796c2846c150befc8cc2c350
treee9c47e6694e4e1feaa5db976775f55889f9ca2e5
parent2f40ca28a4d63df941525801735d05b5b2b86f91
Avoid potentially dereferencing a NULL pointer

GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers
gracefully, but the G_OBJECT_TYPE used in the error handling block
dereferences it without checking it first.

Fix this by checking whether parent->part is valid.

Found using the clang static analyzer.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
mime-node.c