Falk David 92d72467a7 Fix #141222: Assert hit when resizing CurvesGeometry to 0
The `CurvesGeometry::resize` function would not work properly when
passing a new size of zero.
1) The `CustomData_realloc` would allocate an array with zero size.
2) A new size of 1 is passed to `implicit_sharing::resize_trivial_array`
   for the curve offsets when it should pass 0.
3) A value is written out-of-bounds to `curve_offsets`

This fixes the issues in the following ways:
1) `CustomData_realloc` now doesn't allocate any data when the new
    size is 0 and sets the `layer->data` to `nullptr`.
2) When the new number of curves is 0, resize the `curve_offsets` to 0
  not to 1. This also ensures that the data pointer is `nullptr`.
3) Make sure to only write the first and last curve offset when the
  number of curves is greater than 0.

Pull Request: https://projects.blender.org/blender/blender/pulls/141333
2025-07-02 17:16:50 +02:00
2025-06-24 18:44:25 -06:00
2025-07-01 10:47:09 +02:00
2023-12-08 13:28:13 +11:00
2025-05-12 11:34:32 +02:00
2025-06-04 14:10:17 +02:00
2025-03-12 21:55:59 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%