fix(graph): pass subgraph to renderGraph to fix nil pointer crash
The renderGraph function was being called with nil instead of the loaded subgraph, causing a nil pointer dereference in computeDependencyCounts when iterating over subgraph.Dependencies. Changes: - Pass subgraph variable to renderGraph instead of nil - Add defensive nil check in computeDependencyCounts - Add test case for nil subgraph handling Fixes GH#657 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -425,6 +425,10 @@ func computeDependencyCounts(subgraph *TemplateSubgraph) (blocks map[string]int,
|
||||
blocks = make(map[string]int)
|
||||
blockedBy = make(map[string]int)
|
||||
|
||||
if subgraph == nil {
|
||||
return blocks, blockedBy
|
||||
}
|
||||
|
||||
for _, dep := range subgraph.Dependencies {
|
||||
if dep.Type == types.DepBlocks {
|
||||
// dep.DependsOnID blocks dep.IssueID
|
||||
|
||||
Reference in New Issue
Block a user