fixed bug 6301, bad svg crashes Nautilus, by adding a check in

* librsvg/rsvg.c: (rsvg_render_svp):
	fixed bug 6301, bad svg crashes Nautilus, by adding a check
	in rsvg_render_svp to make sure a pixbuf has been allocated; if
	not, don't try to render.
This commit is contained in:
Andy Hertzfeld 2001-02-05 20:16:43 +00:00
parent 466fc2dcd1
commit 1d10bfc8a0
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2001-02-05 Andy Hertzfeld <andy@eazel.com>
* librsvg/rsvg.c: (rsvg_render_svp):
fixed bug 6301, bad svg crashes Nautilus, by adding a check
in rsvg_render_svp to make sure a pixbuf has been allocated; if
not, don't try to render.
2001-02-05 John Sullivan <sullivan@eazel.com>
Fixed bug 6321 (Apparently arbitrary item initially selected

View file

@ -752,6 +752,13 @@ rsvg_render_svp (RsvgCtx *ctx, const ArtSVP *svp,
gboolean has_alpha;
pixbuf = ctx->pixbuf;
/* if a pixbuf hasn't been allocated, the svg is probably misformed. Exit
* to avoid crashing.
*/
if (pixbuf == NULL) {
return;
}
has_alpha = gdk_pixbuf_get_has_alpha (pixbuf);
render = art_render_new (0, 0,