issue #20448: variable client is null if there's an error
Merge pull request #437 from shackbarth/20448

issue #20448: variable client is null if there's an error