summaryrefslogtreecommitdiffstats
path: root/framesequence/jni/FrameSequence_gif.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framesequence/jni/FrameSequence_gif.cpp')
-rw-r--r--framesequence/jni/FrameSequence_gif.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/framesequence/jni/FrameSequence_gif.cpp b/framesequence/jni/FrameSequence_gif.cpp
index 2188c53..e658425 100644
--- a/framesequence/jni/FrameSequence_gif.cpp
+++ b/framesequence/jni/FrameSequence_gif.cpp
@@ -157,7 +157,7 @@ static bool checkIfCover(const GifImageDesc& target, const GifImageDesc& covered
static void copyLine(Color8888* dst, const unsigned char* src, const ColorMapObject* cmap,
int transparent, int width) {
for (; width > 0; width--, src++, dst++) {
- if (*src != transparent) {
+ if (*src != transparent && *src < cmap->ColorCount) {
*dst = gifColorToColor8888(cmap->Colors[*src]);
}
}