config-store: (fixes #2442) Do not crash if an object container has a null item

This commit is contained in:
Stefano Avallone
2016-06-29 17:58:03 +02:00
parent 36f8484352
commit 68ae41b061
2 changed files with 9 additions and 5 deletions

View File

@@ -76,6 +76,7 @@ Bugs fixed
- Bug 2438 - Routing protocols should stop processing packets coming from a non-forwarding interface
- Bug 2439 - SixLowPan Compression kind need to be casted to int in the Print function
- Bug 2440 - SocketIpTosTag might be added twice if a packet is sent multiple times
- Bug 2442 - TrafficControl makes ConfigStore crash
- Bug 2446 - Comma instead of pipe in Attributes
Known issues

View File

@@ -235,11 +235,14 @@ AttributeIterator::DoIterate (Ptr<Object> object)
uint32_t j = (*it).first;
NS_LOG_DEBUG ("ObjectPtrContainer attribute item " << j);
Ptr<Object> tmp = (*it).second;
StartVisitArrayItem (vector, j, tmp);
m_examined.push_back (object);
DoIterate (tmp);
m_examined.pop_back ();
EndVisitArrayItem ();
if (tmp)
{
StartVisitArrayItem (vector, j, tmp);
m_examined.push_back (object);
DoIterate (tmp);
m_examined.pop_back ();
EndVisitArrayItem ();
}
}
EndVisitArrayAttribute ();
continue;