mirror of https://github.com/apache/cloudstack.git
bug 12407: for snapshot, there is no vm related to
status 12407: resolved fixed
This commit is contained in:
parent
6e35f93208
commit
3df3e9fb10
|
|
@ -61,7 +61,8 @@ public class VirtualMachineProfileImpl<T extends VMInstanceVO> implements Virtua
|
|||
if (_params == null) {
|
||||
_params = new HashMap<Param, Object>();
|
||||
}
|
||||
_type = vm.getType();
|
||||
if (vm != null)
|
||||
_type = vm.getType();
|
||||
}
|
||||
|
||||
public VirtualMachineProfileImpl(T vm) {
|
||||
|
|
@ -102,7 +103,7 @@ public class VirtualMachineProfileImpl<T extends VMInstanceVO> implements Virtua
|
|||
|
||||
@Override
|
||||
public VirtualMachineTemplate getTemplate() {
|
||||
if (_template == null) {
|
||||
if (_template == null && _vm != null) {
|
||||
_template = s_templateDao.findByIdIncludingRemoved(_vm.getTemplateId());
|
||||
}
|
||||
return _template;
|
||||
|
|
|
|||
Loading…
Reference in New Issue