Fixed DetachedBuffer self move assignment (#5521)

This commit is contained in:
mmoscicki2
2019-09-19 19:32:24 +02:00
committed by Wouter van Oortmerssen
parent 2f5bb2eec4
commit 97f3aa9174

View File

@@ -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_;