From d75ced8626fbe4064b56c7ccdb56236c2c968584 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 2 Jul 2014 21:55:28 +0000 Subject: QPID-5869 Added a check to see if agent is null before firing the event. There are other places in the code where this check is missing. Chuck will take care of them. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1607488 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/acl/Acl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qpid/cpp') diff --git a/qpid/cpp/src/qpid/acl/Acl.cpp b/qpid/cpp/src/qpid/acl/Acl.cpp index 8a71cf7782..d6a6bd6140 100644 --- a/qpid/cpp/src/qpid/acl/Acl.cpp +++ b/qpid/cpp/src/qpid/acl/Acl.cpp @@ -248,7 +248,9 @@ bool Acl::readAclFile(std::string& aclFile, std::string& errorText) { boost::shared_ptr d(new AclData); AclReader ar(aclValues.aclMaxConnectPerUser, aclValues.aclMaxQueuesPerUser); if (ar.read(aclFile, d)){ - agent->raiseEvent(_qmf::EventFileLoadFailed("", ar.getError())); + if (agent != 0){ + agent->raiseEvent(_qmf::EventFileLoadFailed("", ar.getError())); + } errorText = ar.getError(); QPID_LOG(error,ar.getError()); return false; -- cgit v1.2.1