Commit 6ef55a0e authored by Darin Adler's avatar Darin Adler

Fix bug when gradients are empty.

	* rsvg-paint-server.c: (rsvg_paint_server_lin_grad_render),
	(rsvg_paint_server_rad_grad_render): Fix bug when gradients
	are empty.
parent b814f342
2002-01-03 Darin Adler <darin@bentspoon.com>
* rsvg-paint-server.c: (rsvg_paint_server_lin_grad_render),
(rsvg_paint_server_rad_grad_render): Fix bug when gradients
are empty.
2001-10-19 Darin Adler <darin@bentspoon.com>
* hack-macros/nautilus-macros.m4: Change comment so that we
......
......@@ -154,6 +154,11 @@ rsvg_paint_server_lin_grad_render (RsvgPaintServer *self, ArtRender *ar,
agl = z->agl;
if (agl == NULL)
{
if (rlg->stops->n_stop == 0)
{
/* g_warning ("gradient with no stops -- should be rejected by parser"); */
return;
}
agl = g_new (ArtGradientLinear, 1);
agl->n_stops = rlg->stops->n_stop;
agl->stops = rsvg_paint_art_stops_from_rsvg (rlg->stops);
......@@ -218,6 +223,11 @@ rsvg_paint_server_rad_grad_render (RsvgPaintServer *self, ArtRender *ar,
agr = z->agr;
if (agr == NULL)
{
if (rrg->stops->n_stop == 0)
{
/* g_warning ("gradient with no stops -- should be rejected by parser"); */
return;
}
agr = g_new (ArtGradientRadial, 1);
agr->n_stops = rrg->stops->n_stop;
agr->stops = rsvg_paint_art_stops_from_rsvg (rrg->stops);
......
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