oops leak.. fix fix fix :)

SVN revision: 4670
This commit is contained in:
Carsten Haitzler 2001-04-23 06:22:30 +00:00
parent 9413312693
commit ec26f53719
1 changed files with 11 additions and 8 deletions

View File

@ -84,15 +84,18 @@ __evas_imlib_image_cache_find(char *file)
images = evas_list_remove(images, im);
images = evas_list_prepend(images, im);
imlib_context_set_image(im->image);
__evas_image_cache_used -=
imlib_image_get_width() *
imlib_image_get_height() * 4;
if (im->scaled.image)
if (im->references == 1)
{
imlib_context_set_image(im->scaled.image);
__evas_image_cache_used -=
imlib_image_get_width() *
imlib_image_get_height() * 4;
__evas_image_cache_used -=
imlib_image_get_width() *
imlib_image_get_height() * 4;
if (im->scaled.image)
{
imlib_context_set_image(im->scaled.image);
__evas_image_cache_used -=
imlib_image_get_width() *
imlib_image_get_height() * 4;
}
}
return im;
}