From c4be5124c50e3686720366ded50814a1cb236cdd Mon Sep 17 00:00:00 2001 From: Matt Firth Date: Wed, 15 May 2024 11:44:33 +0100 Subject: [PATCH] Capture ref to sceneStore --- .../lib/src/communication/monitoring_metadata_receiver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ear-production-suite-plugins/lib/src/communication/monitoring_metadata_receiver.cpp b/ear-production-suite-plugins/lib/src/communication/monitoring_metadata_receiver.cpp index bc3ef4b0..a776848f 100644 --- a/ear-production-suite-plugins/lib/src/communication/monitoring_metadata_receiver.cpp +++ b/ear-production-suite-plugins/lib/src/communication/monitoring_metadata_receiver.cpp @@ -65,7 +65,7 @@ void MonitoringMetadataReceiver::handleReceive(std::error_code ec, } // Called by NNG callback on thread with small stack. // Launch task in another thread to overcome stack limitation. - auto future = std::async(std::launch::async, [this, sceneStore]() { + auto future = std::async(std::launch::async, [this, &sceneStore]() { handler_(sceneStore); }); future.get(); //blocking