I see what you did here. Setting this,
if(!departEdge || !departEdge->source()) departEdge = NULLPartEdge;
will eliminate the need for recursion. It simplifies the function. I will rewrite it based on your suggestion.

I'm not sure how I would check if the edge given to me is invalid. But you are right, this should not happen in valid analysis.