Fix null pointer dereference in StatusTargetProvider::GetTargetByName

refs  #9088
This commit is contained in:
Gunnar Beutner 2015-09-28 16:31:49 +02:00
parent f498ce39f3
commit b40152f9fb
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ public:
{
StatsFunction::Ptr func = StatsFunctionRegistry::GetInstance()->GetItem(name);
if (!func)
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid status function name."));
Dictionary::Ptr result = new Dictionary();
Dictionary::Ptr status = new Dictionary();