possible crash fixed

SVN revision: 3286
This commit is contained in:
Carsten Haitzler 2000-08-31 19:02:37 +00:00
parent d0bc2c9c2b
commit 1250f13969
2 changed files with 25 additions and 26 deletions

26
TODO
View File

@ -1,20 +1,6 @@
* Must write saver api
* must turn into shared lib
* Must comment:
blend.c
color.c
colormod.c
context.c
draw.c
file.c
font.c
format.c
grab.c
grad.c
image.c
rgba.c
rgbadraw.c
scale.c
updates.c
ximage.c
* write generic "slow path" renderign code and make sure all fast
path rendering is correct for that visual
* formalize loader/saver api
* fix loaders to only build if libs are present
* move db loader/saver to use edb

View File

@ -241,11 +241,22 @@ __imlib_CurrentCacheSize(void)
{
if (!(IMAGE_IS_VALID(im)))
{
ImlibImage *tmp_im = im;
ImlibImage *tmp_im;
tmp_im = im;
im = im->next;
__imlib_RemoveImageFromCache(tmp_im);
__imlib_ConsumeImage(tmp_im);
ip = pixmaps;
while (ip)
{
if (ip->image == tmp_im)
{
ip->image = NULL;
ip->dirty = 1;
}
ip = ip->next;
}
continue;
}
/* it's valid but has 0 ref's - append to cache size count */
@ -262,10 +273,12 @@ __imlib_CurrentCacheSize(void)
if (ip->references == 0)
{
/* if the image is invalid */
if (!(IMAGE_IS_VALID(ip->image)))
if ((ip->dirty) ||
((ip->image) && (!(IMAGE_IS_VALID(ip->image)))))
{
ImlibImagePixmap *tmp_ip = ip;
ImlibImagePixmap *tmp_ip;
tmp_ip = ip;
ip = ip->next;
__imlib_RemoveImagePixmapFromCache(tmp_ip);
__imlib_ConsumeImagePixmap(tmp_ip);
@ -306,7 +319,7 @@ __imlib_CleanupImageCache(void)
current_cache = __imlib_CurrentCacheSize();
im_last = NULL;
im = images;
/* remove 0 ref coutn invalid (dirty) images */
/* remove 0 ref count invalid (dirty) images */
while (im)
{
im_last = im;