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 committed by Anthony Xu
parent 7c04aa6115
commit d4c7574f12

View File

@ -1642,6 +1642,10 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
for(VolumeResponse vr : volumeResponses) {
String poolId = vr.getStoragePoolId();
if (poolId == null) {
continue;
}
DataStore store = dataStoreManager.getPrimaryDataStore(poolId);
if (store == null) {
continue;