From: Andre Noll Date: Sun, 10 Jan 2010 03:25:16 +0000 (+0100) Subject: btr_node_status(): Do not segfault if btrn is NULL. X-Git-Tag: v0.4.2~172 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=9facffb38faa01da0d1ba9574f9cc1c47b1deb2e btr_node_status(): Do not segfault if btrn is NULL. --- diff --git a/buffer_tree.c b/buffer_tree.c index d12dcde7..a7a3220b 100644 --- a/buffer_tree.c +++ b/buffer_tree.c @@ -753,6 +753,8 @@ int btr_node_status(struct btr_node *btrn, size_t min_iqs, { size_t iqs; + if (!btrn) + return 0; if (type != BTR_NT_LEAF) { if (btr_no_children(btrn)) return -E_BTR_NO_CHILD;