Browse Source

* Free surfaces allocated by pipi_getpixels() in pipi_free().

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2607 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
19874f4650
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      pipi/codec.c

+ 6
- 0
pipi/codec.c View File

@@ -51,6 +51,12 @@ pipi_image_t *pipi_new(int width, int height)

void pipi_free(pipi_image_t *img)
{
unsigned int i;

for(i = 0; i < PIPI_PIXELS_MAX; i++)
if(i != img->codec_format && img->p[i].pixels)
free(img->p[i].pixels);

#if USE_SDL
return pipi_free_sdl(img);
#elif USE_IMLIB2


Loading…
Cancel
Save