Skip to content

Commit

Permalink
Fix segmentation fault in query.go (#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 committed May 7, 2020
1 parent 6bf1879 commit caf0af9
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 @@ -2014,7 +2014,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 caf0af9

Please sign in to comment.