fix bug when one of template was deleted, then delpoyvm, got NPE

This commit is contained in:
Edison Su 2011-03-08 20:11:33 -05:00
parent 771ad2ae9a
commit c2a1f748df
1 changed files with 1 additions and 3 deletions

View File

@ -211,9 +211,7 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
}
for (VMTemplateStoragePoolVO templatePoolVO : templatePoolVOs) {
VMTemplateVO templateInPool = _templateDao.findById(templatePoolVO.getTemplateId());
if ((template != null) && !tmpinstalled && (templateInPool.getId() == template.getId())) {
if ((template != null) && !tmpinstalled && (templatePoolVO.getTemplateId() == template.getId())) {
tmpinstalled = true;
}