CLOUDSTACK-5831: Fix NPE, in case the volume isn't attached to any pool

This commit is contained in:
edison 2014-01-08 17:07:45 -08:00
parent 693f0c280a
commit 1f70154c34

View File

@ -1644,6 +1644,10 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
new VolumeJoinVO[result.first().size()]));
for(VolumeResponse vr : volumeResponses) {
String poolId = vr.getStoragePoolId();
if (poolId == null) {
continue;
}
DataStore store = dataStoreManager.getPrimaryDataStore(poolId);
if (store == null) {
continue;