summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-tga.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2007-09-07 05:45:41 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-09-07 05:45:41 +0000
commit6cbb6928359c9fc649bf6634514b3d97d8d4b5c5 (patch)
treebeac4a28e92afa3468484d8187c26612a142faec /gdk-pixbuf/io-tga.c
parent2f253657967885cc6cb5982bffdffc59b7b9a785 (diff)
downloadgtk+-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.c3
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,