graph: fix a crit error

Resolves issue in PR #756