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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user