rollback part of 5dee576 - avoiding skipping nodes with <= 3 pixels as this fixed only symptoms of the hextree crash and not the root cause (note: divide by zero fix is maintained)

This commit is contained in:
Dane Springmeyer 2012-02-22 14:32:12 -08:00
parent 5b49d64a48
commit 188ba774b9

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));