Skip to content

Commit d6ee60e

Browse files
authored
Merge pull request #131 from libopenstorage/PWX-29069
PWX-29069: Handling panic in case of incorrect volume template
2 parents d65a9e1 + f9548d2 commit d6ee60e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

azure/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func (a *azureOps) Create(
371371
options map[string]string,
372372
) (interface{}, error) {
373373
d, ok := template.(*compute.Disk)
374-
if !ok {
374+
if !ok || d.DiskProperties == nil || d.DiskProperties.DiskSizeGB == nil {
375375
return nil, cloudops.NewStorageError(
376376
cloudops.ErrVolInval,
377377
"Invalid volume template given",

0 commit comments

Comments
 (0)