Fix null pointer deref in "agent list"

refs #7248
This commit is contained in:
Gunnar Beutner 2014-10-24 12:16:36 +02:00
parent 33b2395ff0
commit 10150c3198
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,9 @@ void AgentUtility::PrintAgents(std::ostream& fp)
void AgentUtility::PrintAgentRepository(std::ostream& fp, const Dictionary::Ptr& repository)
{
if (!repository)
return;
ObjectLock olock(repository);
BOOST_FOREACH(const Dictionary::Pair& kv, repository) {
fp << std::setw(4) << " "