Fix T38547: crash in skeleton sketching.
This commit is contained in:
parent
5af3b02f72
commit
e91ddf02a8
Notes:
blender-bot
2023-02-14 11:13:22 +01:00
Referenced by issue #38547, Skeleton Sketching crashes Blender
|
@ -2386,7 +2386,7 @@ static int sketch_draw_stroke(bContext *C, wmOperator *op, const wmEvent *event)
|
|||
SK_DrawData *dd;
|
||||
SK_Sketch *sketch = contextSketch(C, 1);
|
||||
|
||||
op->customdata = dd = MEM_callocN(sizeof("SK_DrawData"), "SketchDrawData");
|
||||
op->customdata = dd = MEM_callocN(sizeof(SK_DrawData), "SketchDrawData");
|
||||
sk_initDrawData(dd, event->mval);
|
||||
|
||||
sk_start_draw_stroke(sketch);
|
||||
|
@ -2412,7 +2412,7 @@ static int sketch_draw_gesture(bContext *C, wmOperator *op, const wmEvent *event
|
|||
SK_Sketch *sketch = contextSketch(C, 1); /* create just to be sure */
|
||||
sk_cancelStroke(sketch);
|
||||
|
||||
op->customdata = dd = MEM_callocN(sizeof("SK_DrawData"), "SketchDrawData");
|
||||
op->customdata = dd = MEM_callocN(sizeof(SK_DrawData), "SketchDrawData");
|
||||
sk_initDrawData(dd, event->mval);
|
||||
|
||||
sk_start_draw_gesture(sketch);
|
||||
|
|
Loading…
Reference in New Issue