diff --git a/src/icon.c b/src/icon.c index e950a7d6..0370d71b 100644 --- a/src/icon.c +++ b/src/icon.c @@ -369,11 +369,12 @@ Bool wIconChangeImageFile(WIcon * icon, char *file) char *path; int error = 0; - if (icon->file_image) + if (icon->file_image) { RReleaseImage(icon->file_image); + icon->file_image = NULL; + } if (!file) { - icon->file_image = NULL; wIconUpdate(icon); return True; }