aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images/SkImageDecoder_libgif.cpp
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-23 20:46:31 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-23 20:46:31 +0000
commit57f4969724a1dd88c8d9ae35a863e6cf621181d5 (patch)
treecb1c377ea38c512e380b21d8d767c4497142f5a8 /src/images/SkImageDecoder_libgif.cpp
parent819c921b0445fa9f45f18d4a560603cd9fde6ba4 (diff)
merge from android tree:
- optional parameters added to descriptorProc and allocPixels - clip options to image decoders - check for xfermode in blitter_a8 - UNROLL loops in blitrow reviewed by reed@google.com git-svn-id: http://skia.googlecode.com/svn/trunk@841 2bbb7eff-a529-9590-31e7-b0007b416f81
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 d2470ccf1d..75a9ee0c8a 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))) {