graph: fix a crit error

Resolves issue in PR #756
Merge pull request #759 from baudehlo/graph

graph: fix a crit error