diff --git a/include/grmGraphOperations.txx b/include/grmGraphOperations.txx
index dcdbdc76e5d2b48331a3937dce0a9c6255a8047a..80a7b73ae35d5efda9240156559df8e79f7f48a9 100644
--- a/include/grmGraphOperations.txx
+++ b/include/grmGraphOperations.txx
@@ -145,7 +145,10 @@ namespace grm
 	typename GraphOperations<TSegmenter>::NodePointerType
 	GraphOperations<TSegmenter>::CheckLMBF(NodePointerType a, float t)
 	{
-		if(a->m_Valid)
+		// TO FIX: if no-data are present within the image, an edgeless node is possible
+		// Here we check if the list of edges is empty prior to cost check.
+		// if(a->m_Valid)
+		if(a->m_Valid && a->m_Edges.size() > 0)
 		{
 			float cost = a->m_Edges.front().m_Cost;
 			
@@ -174,7 +177,10 @@ namespace grm
 	typename GraphOperations<TSegmenter>::NodePointerType
 	GraphOperations<TSegmenter>::CheckBF(NodePointerType a, float t)
 	{
-		if(a->m_Valid)
+		// TO FIX: if no-data are present within the image, an edgeless node is possible
+		// Here we check if the list of edges is empty prior to cost check.
+		// if(a->m_Valid)
+		if(a->m_Valid && a->m_Edges.size() > 0)
 		{
 			float cost = a->m_Edges.front().m_Cost;