aboutsummaryrefslogtreecommitdiffstats
path: root/src/images/SkImageDecoder_libgif.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/images/SkImageDecoder_libgif.cpp')
-rw-r--r--src/images/SkImageDecoder_libgif.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp
index d2470cc..75a9ee0 100644
--- a/src/images/SkImageDecoder_libgif.cpp
+++ b/src/images/SkImageDecoder_libgif.cpp
@@ -117,6 +117,11 @@ static const ColorMapObject* find_colormap(const GifFileType* gif) {
if (NULL == cmap) {
cmap = gif->SColorMap;
}
+
+ if (NULL == cmap) {
+ // no colormap found
+ return NULL;
+ }
// some sanity checks
if (cmap && ((unsigned)cmap->ColorCount > 256 ||
cmap->ColorCount != (1 << cmap->BitsPerPixel))) {