im->real_file() is set on load, but it will be overwritten when the file is saved. so free the old contents before overwriting it.

SVN revision: 8870
This commit is contained in:
Tilman Sauerbeck 2004-02-07 08:44:35 +00:00
parent ec9917caeb
commit 88e423c058
1 changed files with 4 additions and 0 deletions

View File

@ -1281,6 +1281,10 @@ __imlib_SaveImage(ImlibImage * im, const char *file,
/* set the filename to the saved one */
pfile = im->file;
im->file = strdup(file);
if (im->real_file)
free(im->real_file);
im->real_file = strdup(im->file);
/* find the laoder for the format - if its null use the extension */