mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
access: report an error if no access manager is present
The code calling this method expects it to have reported an error on failure. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
39a7dff726
commit
cccc3fc1bb
@ -65,6 +65,12 @@ VIR_ONCE_GLOBAL_INIT(virAccessManager);
|
||||
|
||||
virAccessManagerPtr virAccessManagerGetDefault(void)
|
||||
{
|
||||
if (virAccessManagerDefault == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("No access manager registered"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return virObjectRef(virAccessManagerDefault);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user