diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-05 20:16:43 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-05 20:16:43 +0000 |
commit | 1d10bfc8a08b70dbc5ef47ecb15e5654618a025d (patch) | |
tree | c79983bf0154de8fd08b0dcc0c9a703e8a643d98 /librsvg | |
parent | 466fc2dcd1705678a69248f775db11490385d22c (diff) | |
download | nautilus-1d10bfc8a08b70dbc5ef47ecb15e5654618a025d.tar.gz |
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.
Diffstat (limited to 'librsvg')
-rw-r--r-- | librsvg/rsvg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/librsvg/rsvg.c b/librsvg/rsvg.c index 3cd3aeddd..b3ff94f92 100644 --- a/librsvg/rsvg.c +++ b/librsvg/rsvg.c @@ -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, |