Fix: set dangling pointer to null

The data has been moved somewhere else, the span should not
keep a pointer to it.
This commit is contained in:
2022-07-12 18:47:32 +02:00
parent 5f09440d5a
commit d0a552b5c6

View File

@@ -323,6 +323,7 @@ GVArraySpan::GVArraySpan(GVArraySpan &&other)
else {
data_ = owned_data_;
}
other.owned_data_ = nullptr;
other.data_ = nullptr;
other.size_ = 0;
}
@@ -393,6 +394,7 @@ GMutableVArraySpan::GMutableVArraySpan(GMutableVArraySpan &&other)
else {
data_ = owned_data_;
}
other.owned_data_ = nullptr;
other.data_ = nullptr;
other.size_ = 0;
}