mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
conf: events: handle NULL uuid
Not all objects have a uuid, such as nodedevs. When we add events support for them, NULL will be passed here, so handle it.
This commit is contained in:
parent
128a8b2c9f
commit
2bfa751344
@ -659,7 +659,8 @@ virObjectEventNew(virClassPtr klass,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
event->meta.id = id;
|
event->meta.id = id;
|
||||||
memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
|
if (uuid)
|
||||||
|
memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
|
||||||
|
|
||||||
VIR_DEBUG("obj=%p", event);
|
VIR_DEBUG("obj=%p", event);
|
||||||
return event;
|
return event;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user