Commit 553341b6 authored by Philip Chimento's avatar Philip Chimento

Merge branch 'dash-crash' into 'master'

cairo-context: Special-case 0-sized vector

See merge request GNOME/gjs!271
parents 5eb80e2d 7767103e
......@@ -137,6 +137,8 @@ describe('Cairo', function () {
cr.paint();
cr.paintWithAlpha(1);
cr.setDash([1, 0.5], 1);
cr.stroke();
cr.strokePreserve();
......@@ -153,7 +155,7 @@ describe('Cairo', function () {
cr.showText("foobar");
cr.moveTo(0, 0);
cr.setDash([1, 0.5], 1);
cr.setDash([], 1);
cr.lineTo(1, 0);
cr.lineTo(1, 1);
cr.lineTo(0, 1);
......
......@@ -588,7 +588,7 @@ setDash_func(JSContext *context,
dashes_c.push_back(b);
}
cairo_set_dash(cr, &dashes_c[0], dashes_c.size(), offset);
cairo_set_dash(cr, dashes_c.data(), dashes_c.size(), offset);
argv.rval().setUndefined();
return true;
}
......
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