[Bf-blender-cvs] [03fab057f1e] master: Cleanup: correct asserts

Jacques Lucke noreply at git.blender.org
Tue Jan 17 13:13:55 CET 2023


Commit: 03fab057f1e456a13191c13a6aa2454ecd60a442
Author: Jacques Lucke
Date:   Tue Jan 17 13:11:56 2023 +0100
Branches: master
https://developer.blender.org/rB03fab057f1e456a13191c13a6aa2454ecd60a442

Cleanup: correct asserts

===================================================================

M	source/blender/blenlib/intern/array_utils.cc

===================================================================

diff --git a/source/blender/blenlib/intern/array_utils.cc b/source/blender/blenlib/intern/array_utils.cc
index 1b5b071f0cd..1e1ef354461 100644
--- a/source/blender/blenlib/intern/array_utils.cc
+++ b/source/blender/blenlib/intern/array_utils.cc
@@ -10,7 +10,8 @@ void copy(const GVArray &src,
           const int64_t grain_size)
 {
   BLI_assert(src.type() == dst.type());
-  BLI_assert(src.size() == dst.size());
+  BLI_assert(src.size() >= selection.min_array_size());
+  BLI_assert(dst.size() >= selection.min_array_size());
   threading::parallel_for(selection.index_range(), grain_size, [&](const IndexRange range) {
     src.materialize_to_uninitialized(selection.slice(range), dst.data());
   });



More information about the Bf-blender-cvs mailing list