Commit 97f3aa91 authored by mmoscicki2's avatar mmoscicki2 Committed by Wouter van Oortmerssen

Fixed DetachedBuffer self move assignment (#5521)

parent 2f5bb2ee
......@@ -638,6 +638,9 @@ class DetachedBuffer {
#if !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
DetachedBuffer &operator=(DetachedBuffer &&other) {
if (this == &other)
return *this;
destroy();
allocator_ = other.allocator_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment