fix possible nil pointer dereference in azure sdk

This commit is contained in:
GreenHedgehog 2021-02-03 21:09:05 +03:00
parent 030632e87e
commit d4db1d1342
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func (c *RemoteClient) Get() (*remote.Payload, error) {
ctx := context.TODO()
blob, err := c.giovanniBlobClient.Get(ctx, c.accountName, c.containerName, c.keyName, options)
if err != nil {
if blob.Response.StatusCode == 404 {
if blob.Response.Response != nil && blob.Response.StatusCode == 404 {
return nil, nil
}
return nil, err