diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2007-09-07 05:45:41 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-09-07 05:45:41 +0000 |
commit | 6cbb6928359c9fc649bf6634514b3d97d8d4b5c5 (patch) | |
tree | beac4a28e92afa3468484d8187c26612a142faec /gdk-pixbuf/io-tga.c | |
parent | 2f253657967885cc6cb5982bffdffc59b7b9a785 (diff) | |
download | gtk+-6cbb6928359c9fc649bf6634514b3d97d8d4b5c5.tar.gz |
Fix a crash
svn path=/trunk/; revision=18746
Diffstat (limited to 'gdk-pixbuf/io-tga.c')
-rw-r--r-- | gdk-pixbuf/io-tga.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c index 963c3a6870..3a719c5426 100644 --- a/gdk-pixbuf/io-tga.c +++ b/gdk-pixbuf/io-tga.c @@ -935,7 +935,8 @@ static gboolean gdk_pixbuf__tga_stop_load(gpointer data, GError **err) TGAContext *ctx = (TGAContext *) data; g_return_val_if_fail(ctx != NULL, FALSE); - if (!(ctx->hdr->flags & TGA_ORIGIN_UPPER) && ctx->run_length_encoded) { + if (!(ctx->hdr->flags & TGA_ORIGIN_UPPER) && + ctx->run_length_encoded && ctx->pbuf) { pixbuf_flip_vertically (ctx->pbuf); if (ctx->ufunc) (*ctx->ufunc) (ctx->pbuf, 0, 0, |