提交 1dcb1dc0 编写于 作者: J Ján Tomko

Check if the domain is active in virDomainObjGetPersistentDef

Calling virDomainObjSetDefTransient with live=false is a no-op
on an inactive domain.

Only call it on an active domain, since this is the only place using
the live bool.
上级 9b111048
......@@ -2936,7 +2936,8 @@ virDomainObjGetPersistentDef(virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain)
{
if (virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0)
if (virDomainObjIsActive(domain) &&
virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0)
return NULL;
if (domain->newDef)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册