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:
Jacques Lucke 2022-07-12 18:47:32 +02:00
parent 5f09440d5a
commit d0a552b5c6
1 changed files with 2 additions and 0 deletions

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;
}