Commit 622da9d7 by dheitbri

added check for return of invalid pointer

parent d4e2c1d1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
/// ///
/// $Id: DaqBuffer.h,v 1.2 2005/03/14 23:05:03 yiannis Exp $ /// $Id: DaqBuffer.h,v 1.3 2007/02/09 18:49:14 dheitbri Exp $
/// ///
/// Date: December 2004 /// Date: December 2004
/// ///
...@@ -120,7 +120,10 @@ CDaqBuffer::GetShort(int ind) ///< Return short type pointer to data ...@@ -120,7 +120,10 @@ CDaqBuffer::GetShort(int ind) ///< Return short type pointer to data
inline vector<TDaqByte>::const_pointer inline vector<TDaqByte>::const_pointer
CDaqBuffer::GetDataPtr() const CDaqBuffer::GetDataPtr() const
{ {
if (m_Data.size() > 0)
return &m_Data[0]; return &m_Data[0];
else
return NULL;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment