Commit: d0a552b5c602479f3a4f542f3735bc94b301139e
Author: Jacques Lucke
Date: Tue Jul 12 18:47:32 2022 +0200
Branches: master
https://developer.blender.org/rBd0a552b5c602479f3a4f542f3735bc94b301139e
Fix: set dangling pointer to null
The data has been moved somewhere else, the span should not
keep a pointer to it.
===================================================================
M source/blender/blenlib/intern/generic_virtual_array.cc
===================================================================
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;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs