src/internet-stack/ipv4-l3-protocol.cc
changeset 4669 8aaa5e83939e
parent 4616 a84f60b6cd12
child 5121 872e554039c3
child 5204 cb3087d8f330
child 5595 7c769a64cbd4
--- a/src/internet-stack/ipv4-l3-protocol.cc	Tue Jul 07 16:18:55 2009 +0200
+++ b/src/internet-stack/ipv4-l3-protocol.cc	Tue Jul 07 21:18:01 2009 +0200
@@ -146,12 +146,15 @@
 void
 Ipv4L3Protocol::NotifyNewAggregate ()
 {
-  Ptr<Node>node = this->GetObject<Node>();
-  // verify that it's a valid node and that
-  // the node has not been set before
-  if (node!= 0 && m_node == 0)
+  if (m_node == 0)
     {
-      this->SetNode (node);
+      Ptr<Node>node = this->GetObject<Node>();
+      // verify that it's a valid node and that
+      // the node has not been set before
+      if (node != 0)
+        {
+          this->SetNode (node);
+        }
     }
   Object::NotifyNewAggregate ();
 }