-Fixed coverity #10265
authorBart Polot <bart@net.in.tum.de>
Fri, 25 Nov 2011 17:41:03 +0000 (17:41 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 25 Nov 2011 17:41:03 +0000 (17:41 +0000)
src/mesh/test_mesh_tree_api.c

index 6ad5e918954946c9a688e733dcef5ebbc1d42532..ec92a5eced8cc16c3bd581b31ab60f1b782dbf0d 100644 (file)
@@ -181,7 +181,7 @@ main (int argc, char *argv[])
   tree_add_path (tree, path, &cb, NULL);
   tree_debug (tree);
   path1 = tree_get_path_to_peer (tree, 4);
-  if (path->length != path1->length ||
+  if (NULL == path1 || path->length != path1->length ||
       memcmp (path->peers, path1->peers, path->length) != 0)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Retrieved path != original\n");