diff options
author | Jacques Lucke <jacques@blender.org> | 2022-07-12 19:47:32 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-07-12 19:47:51 +0300 |
commit | d0a552b5c602479f3a4f542f3735bc94b301139e (patch) | |
tree | be736901353f31e5d578587e5d653e4813ef9f09 /source/blender/blenlib/intern/generic_virtual_array.cc | |
parent | 5f09440d5a6ca914651700c31cd8873fe4e496d0 (diff) |
Fix: set dangling pointer to null
The data has been moved somewhere else, the span should not
keep a pointer to it.
Diffstat (limited to 'source/blender/blenlib/intern/generic_virtual_array.cc')
-rw-r--r-- | source/blender/blenlib/intern/generic_virtual_array.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/generic_virtual_array.cc b/source/blender/blenlib/intern/generic_virtual_array.cc index 28bc66e8524..1e548d006b2 100644 --- a/source/blender/blenlib/intern/generic_virtual_array.cc +++ b/source/blender/blenlib/intern/generic_virtual_array.cc @@ -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; } |