Commit 18cd1d22 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

fixed segfault regression in 4.datatructures/05.array.pd example where...

fixed segfault regression in 4.datatructures/05.array.pd example where clicking on the scalar array in a subpatch would cause a segfault
parent 66cb464a
......@@ -1120,7 +1120,7 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
// This, therefore takes into account whether we should count the center point
// of a bar or the starting point (poly) as our reference
// TODO: see if we can reimplement Bezier curves
if (array_garray->x_style == PLOTSTYLE_POLY || array_garray->x_style == PLOTSTYLE_BEZ)
if (array_garray != NULL && (array_garray->x_style == PLOTSTYLE_POLY || array_garray->x_style == PLOTSTYLE_BEZ))
array_motion(0, xpix - pxpix1, ypix - pypix);
else
array_motion(0, (xpix - (pxpix1 + (pxpix2 - pxpix1)/2)), ypix - pypix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment