Skip to content

Commit 495f602

Browse files
committed
internal/core/adt: do not set error for nil task state
After we add memory management, a node may already have been cleared before a task is completed. This is especially the case in auxiliary tools like dep. We add this change before its implementation to see that this change has no effect and to make bisection easier. Issue #3334 Issue #2850 Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I982e33271853b68e8e8f4a1a4ee4325eaec227bf Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1218181 Reviewed-by: Daniel Martí <[email protected]> Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent b96ed2c commit 495f602

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/core/adt/tasks.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ func processComprehension(ctx *OpContext, t *task, mode runMode) {
209209

210210
err := n.processComprehension(y, 0)
211211
t.err = CombineErrors(nil, t.err, err)
212-
t.comp.vertex.state.addBottom(err)
212+
if t.comp.vertex.state != nil {
213+
t.comp.vertex.state.addBottom(err)
214+
}
213215
}
214216

215217
func processDisjunctions(c *OpContext, t *task, mode runMode) {

0 commit comments

Comments
 (0)