face: accommodate empty InterestCallback/DataCallback/NackCallback
refs #3724
Change-Id: Iebfeae48d37d6dedbbdbca2a05730247807675d5
diff --git a/src/detail/interest-filter-record.hpp b/src/detail/interest-filter-record.hpp
index c2916f8..f771d16 100644
--- a/src/detail/interest-filter-record.hpp
+++ b/src/detail/interest-filter-record.hpp
@@ -67,11 +67,14 @@
/**
* @brief invokes the InterestCallback
+ * @note This method does nothing if the Interest callback is empty
*/
void
invokeInterestCallback(const Interest& interest) const
{
- m_interestCallback(m_filter, interest);
+ if (m_interestCallback != nullptr) {
+ m_interestCallback(m_filter, interest);
+ }
}
private: