Fix a crash

svn path=/trunk/; revision=18746
This commit is contained in:
Matthias Clasen 2007-09-07 05:45:41 +00:00
parent 2f25365796
commit 6cbb692835
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-09-07 Matthias Clasen <mclasen@redhat.com>
* io-tga.c (gdk_pixbuf__tga_stop_load): Handle pbuf
being NULL. (#468801, Sebastien Bacher)
2007-07-21 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.6 ===

View File

@ -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,