mirror of
				https://gitea.com/gitea/act_runner.git
				synced 2025-11-03 22:28:55 +01:00 
			
		
		
		
	Fix panic when response is nil (#105)
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/105 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com> Co-committed-by: Jason Song <i@wolfogre.com>
This commit is contained in:
		@@ -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