From 05744ca9c7a02c08269d7c2c23470a1123ed39cd Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 13 Oct 2013 10:19:02 +0200 Subject: [PATCH] Fix condition in RPNG. --- gfx/rpng/rpng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/rpng/rpng.c b/gfx/rpng/rpng.c index 3b6308e667..3b41dad743 100644 --- a/gfx/rpng/rpng.c +++ b/gfx/rpng/rpng.c @@ -390,7 +390,7 @@ static bool png_reverse_filter(uint32_t *data, const struct png_ihdr *ihdr, uint8_t *prev_scanline = (uint8_t*)calloc(1, pitch); uint8_t *decoded_scanline = (uint8_t*)calloc(1, pitch); - if (!decoded_scanline || !decoded_scanline) + if (!prev_scanline || !decoded_scanline) GOTO_END_ERROR(); for (unsigned h = 0; h < ihdr->height;