CLOUDSTACK-4363: fix possible NPE, if copy volume failed.

This commit is contained in:
Edison Su 2013-08-17 17:33:04 -07:00 committed by Edison Su
parent 1c96898ae1
commit 0040c4adef
1 changed files with 5 additions and 1 deletions

View File

@ -335,7 +335,11 @@ public class VolumeObject implements VolumeInfo {
return this.volumeVO.getPath();
} else {
DataObjectInStore objInStore = this.objectInStoreMgr.findObject(this, dataStore);
return objInStore.getInstallPath();
if (objInStore != null) {
return objInStore.getInstallPath();
} else {
return null;
}
}
}