From 5551ef842f83f114794e0c946eb890adf6e3ec3a Mon Sep 17 00:00:00 2001 From: Shahaf Bahar Date: Mon, 13 Nov 2023 12:09:46 +0200 Subject: [PATCH] Fix panic when csi timeout duration is short --- internal/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/util/util.go b/internal/util/util.go index fd54c9ef..ac39db13 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -268,7 +268,7 @@ func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnap if err != nil { if err == wait.ErrWaitTimeout { - if snapshotContent.Status != nil && snapshotContent.Status.Error != nil { + if snapshotContent != nil && snapshotContent.Status != nil && snapshotContent.Status.Error != nil { log.Errorf("Timed out awaiting reconciliation of volumesnapshot, Volumesnapshotcontent %s has error: %v", snapshotContent.Name, *snapshotContent.Status.Error.Message) return nil, errors.Errorf("CSI got timed out with error: %v", *snapshotContent.Status.Error.Message) } else {