From 1f70154c34d51d9ffb3d4cc82f23f08ca78c7fc3 Mon Sep 17 00:00:00 2001 From: edison Date: Wed, 8 Jan 2014 17:07:45 -0800 Subject: [PATCH] CLOUDSTACK-5831: Fix NPE, in case the volume isn't attached to any pool --- server/src/com/cloud/api/query/QueryManagerImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 3d908b48fc4..90455507261 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -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;