diff --git a/ntcore/src/main/native/include/networktables/StructArrayTopic.h b/ntcore/src/main/native/include/networktables/StructArrayTopic.h index f0b557ef642..667570bd7e9 100644 --- a/ntcore/src/main/native/include/networktables/StructArrayTopic.h +++ b/ntcore/src/main/native/include/networktables/StructArrayTopic.h @@ -264,7 +264,8 @@ class StructArrayPublisher : public Publisher { StructArrayPublisher(StructArrayPublisher&& rhs) : Publisher{std::move(rhs)}, m_buf{std::move(rhs.m_buf)}, - m_schemaPublished{rhs.m_schemaPublished}, + m_schemaPublished{ + rhs.m_schemaPublished.load(std::memory_order_relaxed)}, m_info{std::move(rhs.m_info)} {} StructArrayPublisher& operator=(StructArrayPublisher&& rhs) { diff --git a/ntcore/src/main/native/include/networktables/StructTopic.h b/ntcore/src/main/native/include/networktables/StructTopic.h index 7bbacb3509a..b69d0af62bc 100644 --- a/ntcore/src/main/native/include/networktables/StructTopic.h +++ b/ntcore/src/main/native/include/networktables/StructTopic.h @@ -205,7 +205,8 @@ class StructPublisher : public Publisher { StructPublisher(StructPublisher&& rhs) : Publisher{std::move(rhs)}, - m_schemaPublished{rhs.m_schemaPublished}, + m_schemaPublished{ + rhs.m_schemaPublished.load(std::memory_order_relaxed)}, m_info{std::move(rhs.m_info)} {} StructPublisher& operator=(StructPublisher&& rhs) {