diff --git a/src/algorithms/PVT/libs/rtcm.h b/src/algorithms/PVT/libs/rtcm.h index 338c36a8d..23d10db71 100644 --- a/src/algorithms/PVT/libs/rtcm.h +++ b/src/algorithms/PVT/libs/rtcm.h @@ -810,7 +810,7 @@ private: inline void write(const Rtcm_Message& msg) { io_context_.post( - [this, msg]() { + [this, &msg]() { bool write_in_progress = !write_msgs_.empty(); write_msgs_.push_back(msg); if (!write_in_progress)