projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
422677c
)
Do not create empty color table if it does not exist
author
msarett
<msarett@google.com>
Wed, 18 Mar 2015 19:59:46 +0000
(12:59 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Wed, 18 Mar 2015 19:59:46 +0000
(12:59 -0700)
BUG=skia:
Review URL: https://codereview.chromium.org/
1019543003
src/codec/SkCodec_libbmp.cpp
patch
|
blob
|
history
diff --git
a/src/codec/SkCodec_libbmp.cpp
b/src/codec/SkCodec_libbmp.cpp
index 62cda95733c97bc2c90bbe71e538800257b61d77..e9551cbb6ff098338da2ec16383488b6332702a3 100644
(file)
--- a/
src/codec/SkCodec_libbmp.cpp
+++ b/
src/codec/SkCodec_libbmp.cpp
@@
-570,7
+570,9
@@
SkCodec::Result SkBmpCodec::onGetPixels(const SkImageInfo& dstInfo,
}
// Set the color table and return true on success
- fColorTable.reset(SkNEW_ARGS(SkColorTable, (colorTable, maxColors)));
+ if (maxColors > 0) {
+ fColorTable.reset(SkNEW_ARGS(SkColorTable, (colorTable, maxColors)));
+ }
return true;
}