free image? dirty the pixmaps that belong to it and set image pointer to null

SVN revision: 3517
This commit is contained in:
Carsten Haitzler 2000-09-17 22:32:24 +00:00
parent 336cecc801
commit f93e8368ae
1 changed files with 12 additions and 0 deletions

View File

@ -153,6 +153,8 @@ __imlib_ProduceImage(void)
void
__imlib_ConsumeImage(ImlibImage * im)
{
ImlibImagePixmap *ip;
__imlib_FreeAllTags(im);
if (im->file)
free(im->file);
@ -161,6 +163,16 @@ __imlib_ConsumeImage(ImlibImage * im)
if (im->format)
free(im->format);
free(im);
ip = pixmaps;
while (ip)
{
if (ip->image == im)
{
ip->image = NULL;
ip->dirty = 1;
}
ip = ip->next;
}
}
ImlibImage *