fix memleak
This commit is contained in:
@@ -38,6 +38,16 @@ int32_t RageSurfacePalette::FindClosestColor( const RageSurfaceColor &color ) co
|
||||
return iBest;
|
||||
}
|
||||
|
||||
RageSurfaceFormat::RageSurfaceFormat()
|
||||
{
|
||||
palette = NULL;
|
||||
}
|
||||
|
||||
RageSurfaceFormat::~RageSurfaceFormat()
|
||||
{
|
||||
delete palette;
|
||||
}
|
||||
|
||||
void RageSurfaceFormat::GetRGB( uint32_t val, uint8_t *r, uint8_t *g, uint8_t *b ) const
|
||||
{
|
||||
if( BytesPerPixel == 1 )
|
||||
|
||||
@@ -26,6 +26,9 @@ struct RageSurfacePalette
|
||||
|
||||
struct RageSurfaceFormat
|
||||
{
|
||||
RageSurfaceFormat();
|
||||
~RageSurfaceFormat();
|
||||
|
||||
int32_t BytesPerPixel;
|
||||
int32_t BitsPerPixel;
|
||||
uint32_t Rmask, Gmask, Bmask, Amask;
|
||||
|
||||
Reference in New Issue
Block a user