Skip to content

Commit

Permalink
Fix segmentation fault in query.go (hypermodeinc#5377)
Browse files Browse the repository at this point in the history
Use the GetUids function which handles the case where the pointer is nil
correctly.

Fixes DGRAPH-1342
  • Loading branch information
martinmr authored and dna2github committed Jul 18, 2020
1 parent 2125667 commit 2ace2a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,7 @@ func ProcessGraph(ctx context.Context, sg, parent *SubGraph, rch chan error) {

curVal := types.Val{Tid: types.IntID, Value: int64(len(sg.DestUIDs.Uids))}
if types.CompareVals(sg.SrcFunc.Name, curVal, dst) {
sg.DestUIDs.Uids = sg.SrcUIDs.Uids
sg.DestUIDs.Uids = sg.SrcUIDs.GetUids()
} else {
sg.DestUIDs.Uids = nil
}
Expand Down

0 comments on commit 2ace2a1

Please sign in to comment.