diff options
-rw-r--r-- | src/util/container_heap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 96efe9d04..16918985d 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c | |||
@@ -158,7 +158,7 @@ find_element (struct GNUNET_CONTAINER_heap_node *node, void *element) | |||
158 | if (node->left_child != NULL) | 158 | if (node->left_child != NULL) |
159 | ret = find_element (node->left_child, element); | 159 | ret = find_element (node->left_child, element); |
160 | 160 | ||
161 | if (node->right_child != NULL) | 161 | if ((ret == NULL) && (node->right_child != NULL)) |
162 | ret = find_element (node->right_child, element); | 162 | ret = find_element (node->right_child, element); |
163 | 163 | ||
164 | return ret; | 164 | return ret; |