diff --git a/lib/remote/statushandler.cpp b/lib/remote/statushandler.cpp index 810acf61f..eb12e22fe 100644 --- a/lib/remote/statushandler.cpp +++ b/lib/remote/statushandler.cpp @@ -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();