Merge remote-tracking branch 'origin/master'

This commit is contained in:
Artem Pavlenko 2012-02-22 22:47:28 +00:00
commit 8fe79f910f

View file

@ -394,16 +394,7 @@ private:
// clip extreme alfa values
void create_palette_rek(std::vector<rgba> & palette, node * itr) const
{
/*
NOTE: previous code did:
// actually, ignore ones with < 3 pixels
if (itr->count >= 3)
But this could lead to memory corruption
*/
if (itr->count > 0)
if (itr->count >= 3)
{
unsigned count = itr->count;
byte a = byte(itr->alphas/float(count));