You can check if the packet is scheduled already
if (!pkt->isScheduled())
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/YkwncjKefxc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.
It is the packet
if (!pkt->isScheduled()) send(pkt,”out”);
But if you have this error is that you have something strange in the code, in the moment that a module sends a packer the module must ignore/delete the references to the packet, for example
send(pkt,”out”);
pkt = nullptr;
For efficiency, the simulators send the packet instead of a copy of the packet.