Do not create empty color table if it does not exist
BUG=skia: Review URL: https://codereview.chromium.org/1019543003
This commit is contained in:
parent
422677ceab
commit
f21ef2776b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user