From 704c3a29853335839cdb88d0089777857a9e9482 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Fri, 2 Dec 2022 13:07:24 -0500 Subject: [PATCH] allocate for the container to prevent taking the referance of a temporary --- platform/qt/qsacnnode.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/qt/qsacnnode.cpp b/platform/qt/qsacnnode.cpp index d527fd2..4c5013d 100644 --- a/platform/qt/qsacnnode.cpp +++ b/platform/qt/qsacnnode.cpp @@ -245,11 +245,11 @@ void QSacnNode::udpReceive() return; } - // wrap a PDU io stream around the QNetworkDatagram data buffer - auto stream = std::make_shared( - reinterpret_cast(datagram.data().data()), - datagram.data().length()); - UdpPayloadReceiver(stream); + // wrap a PDU i/o stream around the QNetworkDatagram data buffer + auto data = datagram.data(); + auto stream = std::make_shared( + reinterpret_cast(data.data()), data.length()); + UdpPayloadReceiver(stream); } }