Skip to content

Commit 1db0f00

Browse files
committed
볼륨 삭제 메소드의 디스크오퍼링 조회 Null 체크 로직 추가
1 parent fd98581 commit 1db0f00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ public Volume destroyVolume(long volumeId, Account caller, boolean expunge, bool
17421742

17431743
// check if Shared Disk
17441744
DiskOffering offering = _diskOfferingDao.findById(volume.getDiskOfferingId());
1745-
if (volume.getVolumeType() == Volume.Type.DATADISK && offering.getShareable()) {
1745+
if (volume.getVolumeType() == Volume.Type.DATADISK && offering != null && offering.getShareable()) {
17461746
volume.setPath("");
17471747
_volsDao.update(volume.getId(), volume);
17481748
}

0 commit comments

Comments
 (0)