diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 19e4daf1db7..eee806898f6 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -574,6 +574,14 @@ static bool curve_draw_init(bContext *C, wmOperator *op, bool is_invoke) cdd->vc.scene = CTX_data_scene(C); cdd->vc.view_layer = CTX_data_view_layer(C); cdd->vc.obedit = CTX_data_edit_object(C); + + /* Using an empty stroke complicates logic later, + * it's simplest to disallow early on (see: T94085). */ + if (RNA_collection_length(op->ptr, "stroke") == 0) { + MEM_freeN(cdd); + BKE_report(op->reports, RPT_ERROR, "The \"stroke\" cannot be empty"); + return false; + } } op->customdata = cdd; |