From 6cbb6928359c9fc649bf6634514b3d97d8d4b5c5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 7 Sep 2007 05:45:41 +0000 Subject: [PATCH] Fix a crash svn path=/trunk/; revision=18746 --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/io-tga.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 9676c9fd96..17c289d4e0 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2007-09-07 Matthias Clasen + + * io-tga.c (gdk_pixbuf__tga_stop_load): Handle pbuf + being NULL. (#468801, Sebastien Bacher) + 2007-07-21 Matthias Clasen * === Released 2.11.6 === 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,