From b61d5a78ae715e9479e11fd6ba669ec88a87d2d9 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 1 Jun 2014 01:16:53 +0800 Subject: [PATCH] fix match_route --- src/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.c b/src/node.c index 7143e43..3208d87 100644 --- a/src/node.c +++ b/src/node.c @@ -362,7 +362,7 @@ node * r3_tree_matchl(const node * n, const char * path, int path_len, const mat route * r3_tree_match_route(const node *tree, const match_entry * entry) { node *n; n = r3_tree_match_entry(tree, entry); - if (n->routes && n->route_len > 0) { + if (n && n->routes && n->route_len > 0) { int i; for (i = 0; i < n->route_len ; i++ ) { if ( r3_route_cmp(n->routes[i], entry) == 0 ) {