removed unneeded test for pal!=NULL in ConvertToImage() (coverity checker CID 10)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-03-07 23:44:25 +00:00
parent 517cce713e
commit fbf1ee1d09

View File

@ -142,21 +142,18 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const
image->SetMask(false);
#if wxUSE_PALETTE
if (pal)
unsigned char r[256];
unsigned char g[256];
unsigned char b[256];
for (i = 0; i < 256; i++)
{
unsigned char r[256];
unsigned char g[256];
unsigned char b[256];
for (i = 0; i < 256; i++)
{
r[i] = pal[3*i + 0];
g[i] = pal[3*i + 1];
b[i] = pal[3*i + 2];
}
image->SetPalette(wxPalette(256, r, g, b));
r[i] = pal[3*i + 0];
g[i] = pal[3*i + 1];
b[i] = pal[3*i + 2];
}
image->SetPalette(wxPalette(256, r, g, b));
#endif // wxUSE_PALETTE
/* copy image data */