mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix: Prevent NPE on disk offering search while listing VMs (#6287)
This commit is contained in:
parent
56fb7ac128
commit
5cf8064467
@ -1052,8 +1052,11 @@ public class ApiDBUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static DiskOfferingVO findDiskOfferingById(Long diskOfferingId) {
|
public static DiskOfferingVO findDiskOfferingById(Long diskOfferingId) {
|
||||||
|
if (diskOfferingId == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
DiskOfferingVO off = s_diskOfferingDao.findByIdIncludingRemoved(diskOfferingId);
|
DiskOfferingVO off = s_diskOfferingDao.findByIdIncludingRemoved(diskOfferingId);
|
||||||
if (!off.isComputeOnly()) {
|
if (off != null && !off.isComputeOnly()) {
|
||||||
return off;
|
return off;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user