summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/imageviewer/gif/gif_decoder.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/plugins/imageviewer/gif/gif_decoder.c b/apps/plugins/imageviewer/gif/gif_decoder.c
index e45814cbef..f57eab1cf1 100644
--- a/apps/plugins/imageviewer/gif/gif_decoder.c
+++ b/apps/plugins/imageviewer/gif/gif_decoder.c
@@ -136,7 +136,7 @@ static void set_canvas_background(pixel_t *out, GifFileType *GifFile)
* to reset canvas to global background color specified in gif BUT
* all renderers I know use transparency instead.
*/
- memset(out, PIXEL_TRANSPARENT, PIXELS_SZ);
+ memset(out, PIXEL_TRANSPARENT, PIXELS_SZ);
}
/* var names adhere to giflib coding style */
@@ -282,7 +282,8 @@ void gif_decode(struct gif_decoder *d,
Row + j, Col, Width);
}
- pf_progress(25*(i+1), 100);
+ if (pf_progress != NULL)
+ pf_progress(25*(i+1), 100);
}
}
else
@@ -299,7 +300,8 @@ void gif_decode(struct gif_decoder *d,
gif2pixels(Line, pixels_buffer[buf_idx],
Row + i, Col, Width);
- pf_progress(100*(i+1)/Height, 100);
+ if (pf_progress != NULL)
+ pf_progress(25*(i+1), 100);
}
}
@@ -406,7 +408,7 @@ void gif_decode(struct gif_decoder *d,
free(pixels_buffer[1]);
free(Line);
-
+
/* WARNING !!!! */
/* GifFile object is trashed from now on, DONT use it */
/* Move bitmap in native format to the front of the buff */