Corrected handling and messaging about empty packets in DTSC::Packet::reinit.

This commit is contained in:
Thulinma 2014-08-05 16:45:51 +02:00
parent 9554263e2f
commit 306c896bea

View file

@ -132,12 +132,12 @@ namespace DTSC {
///\param len The length of the data pointed to by data_
///\param noCopy Determines whether to make a copy or not
void Packet::reInit(const char * data_, unsigned int len, bool noCopy) {
if (!len){
if (!data_) {
DEBUG_MSG(DLVL_DEVEL, "ReInit received a null pointer with len %d, ignoring", len);
null();
return;
}
if (!data_) {
DEBUG_MSG(DLVL_DEVEL, "ReInit received a null pointer with len %d, ignoring", len);
if (!data_[0] && !data_[1] && !data_[2] && !data_[3]){
null();
return;
}