diff options
author | Carsten Haitzler <raster@rasterman.com> | 2000-08-31 19:02:37 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2000-08-31 19:02:37 +0000 |
commit | 1250f1396953ea5191988c69e97858bb477c0fb6 (patch) | |
tree | 9bef1e5961ce5f10b9726aa43665ed338ca22754 | |
parent | d0bc2c9c2bd504e1c26ee48d87c1114a68a532c1 (diff) | |
download | imlib2-1250f1396953ea5191988c69e97858bb477c0fb6.tar.gz |
possible crash fixed
SVN revision: 3286
-rw-r--r-- | TODO | 26 | ||||
-rw-r--r-- | src/image.c | 25 |
2 files changed, 25 insertions, 26 deletions
@@ -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 + diff --git a/src/image.c b/src/image.c index c61830b..4d9ef33 100644 --- a/src/image.c +++ b/src/image.c @@ -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; |