Commit 620a387b authored by Laurent Claustre's avatar Laurent Claustre

mem. alloc failure proof

parent 562a88cf
......@@ -471,8 +471,12 @@ void Camera::_allocTmpBuffer()
{
#ifdef __unix
int ret=posix_memalign(&m_tmp_buffer[i],16,ImageSize_);
if (ret)
THROW_HW_ERROR(Error) << "posix_memalign(): request for aligned memory allocation failed";
#else
m_tmp_buffer[i] = _aligned_malloc(ImageSize_,16);
if (m_tmp_buffer[i] == NULL)
THROW_HW_ERROR(Error) << "_aligned_malloc(): request for aligned memory allocation failed";
#endif
}
}
......
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