Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/access/viraccessmanager.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/access/viraccessmanager.c b/src/access/viraccessmanager.c
index f5d62604cf..26a16c6fb3 100644
--- a/src/access/viraccessmanager.c
+++ b/src/access/viraccessmanager.c
@@ -65,6 +65,11 @@ 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);
}
--
2.21.0