From 836ae3f40cbd1734fb502609ca57afc2cb5a1a15 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 21 Dec 2012 02:32:55 +0000 Subject: - fix --- src/mesh/gnunet-service-mesh.c | 4 ++-- src/mesh/mesh_tunnel_tree.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesh') diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 06cdb241c..7c9addeb6 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -5850,14 +5850,14 @@ handle_mesh_tunnel_destroy (void *cls, const struct GNUNET_PeerIdentity *peer, 1, GNUNET_NO); return GNUNET_OK; } - parent = tree_get_predecessor(t->tree); + parent = tree_get_predecessor (t->tree); pid = GNUNET_PEER_search (peer); if (pid != parent) { unsigned int nc; tree_del_peer (t->tree, pid, &tunnel_child_removed, t); - nc = tree_count_children(t->tree); + nc = tree_count_children (t->tree); if (nc > 0 || NULL != t->owner || t->nclients > 0) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/mesh/mesh_tunnel_tree.c b/src/mesh/mesh_tunnel_tree.c index 3402f6743..41b25c3a4 100644 --- a/src/mesh/mesh_tunnel_tree.c +++ b/src/mesh/mesh_tunnel_tree.c @@ -742,7 +742,7 @@ tree_del_path (struct MeshTunnelTree *t, GNUNET_PEER_Id peer_id, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Deleting path to %s.\n", GNUNET_i2s (&id)); #endif - if (peer_id == t->root->peer) + if (NULL == t->root || peer_id == t->root->peer) return NULL; for (n = t->disconnected_head; NULL != n; n = n->next) -- cgit v1.2.3