diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/etherint.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dev/etherint.hh b/dev/etherint.hh index 1aa85f17c..dfc9f6fd6 100644 --- a/dev/etherint.hh +++ b/dev/etherint.hh @@ -56,7 +56,10 @@ class EtherInt : public SimObject void setPeer(EtherInt *p); virtual bool recvPacket(PacketPtr packet) = 0; void recvDone() { peer->sendDone(); } - bool sendPacket(PacketPtr packet) { return peer->recvPacket(packet); } + bool sendPacket(PacketPtr packet) + { + return peer ? peer->recvPacket(packet) : true; + } virtual void sendDone() = 0; }; |