Skip to content

Commit d4c7574

Browse files
sudisonAnthony Xu
authored andcommitted
CLOUDSTACK-5831: Fix NPE, in case the volume isn't attached to any pool
1 parent 7c04aa6 commit d4c7574

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎server/src/com/cloud/api/query/QueryManagerImpl.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,10 @@ public ListResponse<VolumeResponse> searchForVolumes(ListVolumesCmd cmd) {
16421642

16431643
for(VolumeResponse vr : volumeResponses) {
16441644
String poolId = vr.getStoragePoolId();
1645+
if (poolId == null) {
1646+
continue;
1647+
}
1648+
16451649
DataStore store = dataStoreManager.getPrimaryDataStore(poolId);
16461650
if (store == null) {
16471651
continue;

0 commit comments

Comments
 (0)