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

This commit is contained in:
Edison Su 2013-08-17 17:33:04 -07:00
parent bc584062fe
commit e3a6657c93
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;
}
}
}