diff options
Diffstat (limited to 'src/images/SkImageDecoder_libgif.cpp')
-rw-r--r-- | src/images/SkImageDecoder_libgif.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp index 86ead1faff..258a8a017d 100644 --- a/src/images/SkImageDecoder_libgif.cpp +++ b/src/images/SkImageDecoder_libgif.cpp @@ -119,8 +119,8 @@ static const ColorMapObject* find_colormap(const GifFileType* gif) { cmap = gif->SColorMap; } // some sanity checks - if ((unsigned)cmap->ColorCount > 256 || - cmap->ColorCount != (1 << cmap->BitsPerPixel)) { + if (cmap && ((unsigned)cmap->ColorCount > 256 || + cmap->ColorCount != (1 << cmap->BitsPerPixel))) { cmap = NULL; } return cmap; |