Fix T38547: crash in skeleton sketching.

This commit is contained in:
Brecht Van Lommel 2014-02-11 16:14:20 +01:00
parent 5af3b02f72
commit e91ddf02a8
Notes: blender-bot 2023-02-14 11:13:22 +01:00
Referenced by issue #38547, Skeleton Sketching crashes Blender
1 changed files with 2 additions and 2 deletions

View File

@ -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);