Ok,
seems to be ok now :-)
--- a/src/icon.c
+++ b/src/icon.c
@@ -778,8 +778,10 @@ static int get_rimage_icon_from_wm_hints(WIcon *icon)
/* Resize the icon to the wPreferences.icon_size size */
image = wIconValidateIconSize(image, wPreferences.icon_size);
- /* FIXME: If unset_icon_image, pointer double free then crash
- unset_icon_image(icon); */
+ unset_icon_image(icon);
+
+ /* Set the new info */
+ icon->file = NULL;
icon->file_image = image;
return 0;
On Wed, 14 Nov 2012, Rodolfo kix Garcia escribió:
> Hi,
>
> I don't understand why this happends. If I do this change:
>
> @@ -778,8 +778,7 @@ static int get_rimage_icon_from_wm_hints(WIcon *icon)
> /* Resize the icon to the wPreferences.icon_size size */
> image = wIconValidateIconSize(image, wPreferences.icon_size);
>
> - /* FIXME: If unset_icon_image, pointer double free then crash
> - unset_icon_image(icon); */
> + unset_icon_image(icon);
> icon->file_image = image;
>
> wmaker crash by double free or corruption. The problem is only with
> get_rimage_icon_from_wm_hints(), but unset_icon_image() is used in multiple
> functions.
>
> If I do this change, no problem:
>
> @@ -591,8 +591,8 @@ void wIconSelect(WIcon * icon)
>
> static void unset_icon_image(WIcon *icon)
> {
> - if (icon->file)
> - wfree(icon->file);
> +// if (icon->file)
> +// wfree(icon->file);
>
> But of course, icon->file is not freeded.
>
> Please, help.
>
> Thanks.
> kix
> --
> ||// //\\// Rodolfo "kix" Garcia
> ||\\// //\\ http://www.kix.es/
>
>
> --
> To unsubscribe, send mail to [email protected].
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to [email protected].