[Bf-blender-cvs] [e5af9a12d75] blender-v3.3-release: Fix T101262: Crash in spreadsheet selection filter with empty domain

Hans Goudey noreply at git.blender.org
Wed Oct 26 12:00:18 CEST 2022


Commit: e5af9a12d7560d5ea279b78e6b7bb1f9fef8de5b
Author: Hans Goudey
Date:   Wed Sep 21 17:34:30 2022 -0500
Branches: blender-v3.3-release
https://developer.blender.org/rBe5af9a12d7560d5ea279b78e6b7bb1f9fef8de5b

Fix T101262: Crash in spreadsheet selection filter with empty domain

The BMesh selection virtual array was empty. There are a few different
places we could add an "empty" check here, but at the top of the
function is the simplest for now.

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

M	source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc

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

diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
index fdcf9798b7f..c772a711522 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
@@ -265,6 +265,9 @@ IndexMask GeometryDataSource::apply_selection_filter(Vector<int64_t> &indices) c
 {
   std::lock_guard lock{mutex_};
   const IndexMask full_range(this->tot_rows());
+  if (full_range.is_empty()) {
+    return full_range;
+  }
 
   switch (component_->type()) {
     case GEO_COMPONENT_TYPE_MESH: {



More information about the Bf-blender-cvs mailing list