C++: Fix Packet destructor for packets without payload.
This commit is contained in:
parent
4178d9712f
commit
1797a887d7
|
@ -916,7 +916,8 @@ Packet::Packet(const struct sr_datafeed_packet *structure) :
|
|||
|
||||
Packet::~Packet()
|
||||
{
|
||||
delete payload;
|
||||
if (payload)
|
||||
delete payload;
|
||||
}
|
||||
|
||||
const PacketType *Packet::get_type()
|
||||
|
|
Loading…
Reference in New Issue