From ebe4842ec22bc0ad9862cf19ae2df2d7082dc6ac Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 8 Sep 2014 16:46:41 -0400 Subject: [PATCH] fix another segfault --- src/zm_local_camera.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp index aa381434e..8125e8b28 100644 --- a/src/zm_local_camera.cpp +++ b/src/zm_local_camera.cpp @@ -2134,13 +2134,13 @@ int LocalCamera::PostCapture() return( -1 ); } } - if ( v4l2_data.bufptr ) { - Debug( 3, "Requeueing buffer %d", v4l2_data.bufptr->index ); - if ( vidioctl( vid_fd, VIDIOC_QBUF, v4l2_data.bufptr ) < 0 ) - { - Error( "Unable to requeue buffer %d: %s", v4l2_data.bufptr->index, strerror(errno) ) - return( -1 ); - } + if ( v4l2_data ) { + Debug( 3, "Requeueing buffer %d", v4l2_data.bufptr->index ); + if ( vidioctl( vid_fd, VIDIOC_QBUF, v4l2_data.bufptr ) < 0 ) + { + Error( "Unable to requeue buffer %d: %s", v4l2_data.bufptr->index, strerror(errno) ) + return( -1 ); + } } else { Error( "Unable to requeue buffer due to not v4l2_data" ) }