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:
parent
5f09440d5a
commit
d0a552b5c6
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue