Not every AppVM or DispVM must have a valid TemplateVM...

This commit is contained in:
Joanna Rutkowska 2011-03-24 17:34:02 +01:00
parent 8ca1476004
commit 0fae099ab9

View File

@ -105,7 +105,7 @@ class VmInfoWidget (QWidget):
layout1 = QHBoxLayout()
if vm.is_appvm() or vm.is_disposablevm():
label_tmpl = QLabel ("<i><font color=\"gray\">" + vm.template_vm.name + "</i></font>")
label_tmpl = QLabel ("<i><font color=\"gray\">" + (vm.template_vm.name if vm.template_vm is not None else "--") + "</i></font>")
elif vm.is_template():
label_tmpl = QLabel ("<i><font color=\"gray\">TemplateVM</i></font>")
elif vm.qid == 0: