From 70d01f1f5699e265f79985b61136a62f9fa18a49 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 3 May 2018 22:13:33 +0200 Subject: Make gif rendering more robust --- src/Gif.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/Gif.cpp b/src/Gif.cpp index 7a80f86..c79153c 100644 --- a/src/Gif.cpp +++ b/src/Gif.cpp @@ -169,7 +169,10 @@ namespace dchat u32 i = currentFrame % gif.frame_count; gif_result code = gif_decode_frame(&gif, i); if(code != GIF_OK) + { printf("Warning: gif_decode_frame: %s\n", gifResultToString(code)); + break; + } gif_frame &frame = gif.frames[i]; // frame_delay is in centiseconds -- cgit v1.2.3