mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +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;
|
||||
}
|
||||
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);
|
||||
return event;
|
||||
|
Loading…
Reference in New Issue
Block a user