diff --git a/storage_drivers/azure/api/azure.go b/storage_drivers/azure/api/azure.go index d93bc0da3..01a4ba674 100644 --- a/storage_drivers/azure/api/azure.go +++ b/storage_drivers/azure/api/azure.go @@ -1077,7 +1077,7 @@ func (c Client) ModifyVolume( } // Modify the export-rule to restrict the kerberos protocol type - if &anfVolume.Properties.ExportPolicy.Rules[0] != nil && &exportRule != nil { + if len(anfVolume.Properties.ExportPolicy.Rules) > 0 && &exportRule != nil { anfVolume.Properties.ExportPolicy.Rules[0].Nfsv41 = &exportRule.Nfsv41 anfVolume.Properties.ExportPolicy.Rules[0].Kerberos5ReadWrite = &exportRule.Kerberos5ReadWrite anfVolume.Properties.ExportPolicy.Rules[0].Kerberos5ReadOnly = &exportRule.Kerberos5ReadOnly