bug 6403: template id of volume may be NULL, need to handle this

status 6403: resolved fixed
This commit is contained in:
anthony 2010-10-05 15:42:23 -07:00
parent 4c839ee7de
commit 0a2eccce7a
1 changed files with 2 additions and 2 deletions

View File

@ -2213,8 +2213,8 @@ public class UserVmManagerImpl implements UserVmManager {
String origTemplateInstallPath = null;
if (ImageFormat.ISO != _snapshotMgr.getImageFormat(volumeId)) {
ImageFormat format = _snapshotMgr.getImageFormat(volumeId);
if (format != null && format != ImageFormat.ISO) {
Long origTemplateId = volume.getTemplateId();
VMTemplateHostVO vmTemplateHostVO = _templateHostDao.findByHostTemplate(secondaryStorageHost.getId(), origTemplateId);
origTemplateInstallPath = vmTemplateHostVO.getInstallPath();