From 64734dd13a415d2abf2346867b97e1211ac9d5dc Mon Sep 17 00:00:00 2001 From: Alexey Zhuchkov Date: Mon, 22 Nov 2021 09:40:32 +0300 Subject: [PATCH] Fix npe on debug output --- runner/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/runner.go b/runner/runner.go index 1619006f2..f74383809 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -850,7 +850,7 @@ retry: gologger.Info().Msgf("Dumped HTTP request for %s\n\n", fullURL) gologger.Print().Msgf("%s", string(requestDump)) } - if r.options.Debug || r.options.DebugResponse { + if (r.options.Debug || r.options.DebugResponse) && resp != nil { gologger.Info().Msgf("Dumped HTTP response for %s\n\n", fullURL) gologger.Print().Msgf("%s", string(resp.Raw)) }