Fix new possible crash in GifDecoder::getFrameColormap()

This commit is contained in:
David Capello 2015-07-31 12:25:33 -03:00
parent a6c24ac768
commit 271750129c

View File

@ -374,8 +374,8 @@ private:
// Doesn't have local map, use the global one
colormap = global;
}
else if (!m_hasLocalColormaps) {
if (!global || global->ColorCount != colormap->ColorCount)
else if (global && !m_hasLocalColormaps) {
if (global->ColorCount != colormap->ColorCount)
m_hasLocalColormaps = true;
else {
for (int i=0; i<colormap->ColorCount; ++i) {