Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/conf/domain_conf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4c3ab07062..92c734e13d 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2767,7 +2767,7 @@ int virDomainDefValidate(virDomainDefPtr def,
static inline bool
virDomainObjIsActive(virDomainObjPtr dom)
{
- return dom->def->id != -1;
+ return dom->def && dom->def->id != -1;
}
int virDomainObjCheckActive(virDomainObjPtr dom);
--
2.21.0