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 | b8e4e96ff912b4d8d8baf24e949f0fe1118f1d4f (patch) | |
tree | de3e41425cc2e7fb35e217f3a23ccdae3768dc31 /gdk-pixbuf/io-tga.c | |
parent | 861f2621f667e9bfa796293143ec4e4b94c89ffa (diff) | |
download | gdk-pixbuf-b8e4e96ff912b4d8d8baf24e949f0fe1118f1d4f.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 963c3a687..3a719c542 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, |