mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-04 22:37:55 +00:00
Fix panic when response is nil (#105)
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/105 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: Jason Song <[email protected]> Co-committed-by: Jason Song <[email protected]>
This commit is contained in:
1 parent
d139faa40c
commit
9c6499ec08
1 file changed
+1
-1
@@ -74,7 +74,7 @@ func (p *Poller) fetchTask(ctx context.Context) (*runnerv1.Task, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
if resp.Msg.Task == nil {
|
||||
if resp == nil || resp.Msg == nil || resp.Msg.Task == nil {
|
||||
return nil, false
|
||||
}
|
||||
return resp.Msg.Task, true
|
||||
|
||||
Reference in new issue
Block a user