diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc index b73b58dd75f..3b2cb4f5c9c 100644 --- a/source/blender/editors/sculpt_paint/paint_image.cc +++ b/source/blender/editors/sculpt_paint/paint_image.cc @@ -818,8 +818,11 @@ static blender::float3 paint_init_pivot_mesh(Object *ob) static blender::float3 paint_init_pivot_curves(Object *ob) { const Curves &curves = *static_cast(ob->data); - const blender::Bounds bounds = *curves.geometry.wrap().bounds_min_max(); - return blender::math::midpoint(bounds.min, bounds.max); + const std::optional> bounds = curves.geometry.wrap().bounds_min_max(); + if (bounds.has_value()) { + return blender::math::midpoint(bounds->min, bounds->max); + } + return blender::float3(0); } static blender::float3 paint_init_pivot_grease_pencil(Object *ob, const int frame)