Skip to content

Commit

Permalink
libuvc: fix undefined behavior caused by capture-by-reference of loca…
Browse files Browse the repository at this point in the history
…l variable

It appears this was introduced in 9d17956.
  • Loading branch information
WasabiFan committed Apr 18, 2019
1 parent cb27100 commit 743fd18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libuvc/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ uvc_error_t uvc_stream_start(
* with the contents of each frame.
*/
if (cb) {
strmh->cb_thread = std::thread([&]() {_uvc_user_caller((void*)strmh); });
strmh->cb_thread = std::thread([strmh]() {_uvc_user_caller((void*)strmh); });
}

for (transfer_id = 0; transfer_id < LIBUVC_NUM_TRANSFER_BUFS;
Expand Down

0 comments on commit 743fd18

Please sign in to comment.