修复:invalid memory address or nil pointer dereference
This commit is contained in:
parent
973b96914c
commit
8eded066ea
|
|
@ -46,6 +46,16 @@ func ChangePullRequestCloseStatus(ctx *context.APIContext) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err = pr.LoadBaseRepo(ctx); err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
}
|
||||
if err = pr.LoadHeadRepo(ctx); err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
}
|
||||
|
||||
changeStatus := ctx.FormBool("is_closed")
|
||||
if changeStatus {
|
||||
_, err = issues_model.CloseIssue(ctx, pr.Issue, ctx.Doer)
|
||||
|
|
|
|||
Loading…
Reference in New Issue