Skip to content

Commit f9548d2

Browse files
committed
PWX-29069: Handling panic in case of incorrect volume template
Signed-off-by: Priyanshu Pandey <ppandey@purestorage.com>
1 parent d65a9e1 commit f9548d2

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)