From 306c896bea44377c0244263c179e38e3e0cf0dd8 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 5 Aug 2014 16:45:51 +0200 Subject: [PATCH] Corrected handling and messaging about empty packets in DTSC::Packet::reinit. --- lib/dtscmeta.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dtscmeta.cpp b/lib/dtscmeta.cpp index 8f742817..0e6f4801 100644 --- a/lib/dtscmeta.cpp +++ b/lib/dtscmeta.cpp @@ -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; }