From aea7938f19b1d6f17429143b92e63e74cd031b10 Mon Sep 17 00:00:00 2001
From: thorkill <thkr@hannover.ccc.de>
Date: Sun, 5 Jul 2015 00:31:01 +0200
Subject: [PATCH] Added sanity check in test in sssp_bfs()

---
 src/graph.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/graph.c b/src/graph.c
index dca3b057..ab4b4198 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -135,6 +135,10 @@ static void sssp_bfs(void) {
 
 	/* Clear visited status on nodes */
 
+	if (!node_tree) {
+		logger(DEBUG_ALWAYS, LOG_ERR, "sssp_bfs(): node_tree == NULL. aborting!");
+		abort();
+	}
 	for splay_each(node_t, n, node_tree) {
 		n->status.visited = false;
 		n->status.indirect = true;