[Bf-blender-cvs] [4f2f3114b7b] master: Fix: Incorrect assert in curves code

Hans Goudey noreply at git.blender.org
Sat Feb 26 23:33:54 CET 2022


Commit: 4f2f3114b7be2760d74ef1024626dd9f960a7bf3
Author: Hans Goudey
Date:   Sat Feb 26 17:33:45 2022 -0500
Branches: master
https://developer.blender.org/rB4f2f3114b7be2760d74ef1024626dd9f960a7bf3

Fix: Incorrect assert in curves code

The attribute data might be null if the number of curves is zero.
While that is not common, an empty curves data-block is valid.

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

M	source/blender/blenkernel/intern/curves_geometry.cc

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

diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index eb2a0b37af2..68797942b56 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -145,7 +145,6 @@ MutableSpan<int8_t> CurvesGeometry::curve_types()
                                                       nullptr,
                                                       this->curve_size,
                                                       ATTR_CURVE_TYPE.c_str());
-  BLI_assert(data != nullptr);
   return {data, this->curve_size};
 }



More information about the Bf-blender-cvs mailing list