Compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,9 +102,9 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
|
|||||||
#if wxUSE_PALETTE
|
#if wxUSE_PALETTE
|
||||||
if (pal && colors > 0)
|
if (pal && colors > 0)
|
||||||
{
|
{
|
||||||
unsigned char r[colors];
|
unsigned char* r = new unsigned char[colors];
|
||||||
unsigned char g[colors];
|
unsigned char* g = new unsigned char[colors];
|
||||||
unsigned char b[colors];
|
unsigned char* b = new unsigned char[colors];
|
||||||
|
|
||||||
for (i = 0; i < colors; i++)
|
for (i = 0; i < colors; i++)
|
||||||
{
|
{
|
||||||
@@ -114,6 +114,10 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
image->SetPalette(wxPalette(colors, r, g, b));
|
image->SetPalette(wxPalette(colors, r, g, b));
|
||||||
|
|
||||||
|
delete [] r;
|
||||||
|
delete [] g;
|
||||||
|
delete [] b;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_PALETTE
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user