table: fix Pit::erase crash when Interest name contains implicit digest
refs #3608
Change-Id: I41e0cd327b9dcc5f2d3a83f4cebff40c2d302fc1
diff --git a/daemon/table/pit.cpp b/daemon/table/pit.cpp
index 12a21bd..ae5a5cd 100644
--- a/daemon/table/pit.cpp
+++ b/daemon/table/pit.cpp
@@ -113,7 +113,7 @@
void
Pit::erase(shared_ptr<pit::Entry> pitEntry)
{
- shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(*pitEntry);
+ shared_ptr<name_tree::Entry> nameTreeEntry = pitEntry->m_nameTreeEntry;
BOOST_ASSERT(static_cast<bool>(nameTreeEntry));
nameTreeEntry->erasePitEntry(pitEntry);