On Wed, 24 Oct 2012, Carlos R. Mafra escribió:
> On Wed, 24 Oct 2012 at 8:45:47 +0200, Rodolfo García Peñas wrote:
> >
> > And, wmaker crash. Why? because IMO the code used to remove items
> > from the HastTables (domain database) is wrong. It removes the
> > item, but don't "removes the hole", then the next search in the
> > hashtable, returns the item in the "hole", a memory "no-item" (trash,
> > the " f"). The code is at WINGs/hashtable.c, functions WMHashRemove()
> > and deleteFromList(). Help is very appreciated. Probably you can
> > reproduce the problem renaming the defaultAppIcon.tiff image after
> > wmaker is up and launching a application without icon (declare a non
> > exist file in WMState file).
>
> Does the crash happen without your patches too?
>
>
> --
> To unsubscribe, send mail to [email protected].
Ok
I did something wrong... now is fine:
kix@osaka:~/src/wmaker/wmaker-crm/src$ git diff
diff --git a/src/icon.c b/src/icon.c
index b4ccfc5..4b3e070 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -649,19 +649,14 @@ static RImage *get_default_image(WScreen *scr)
file = wDefaultGetIconFile(NULL, NULL, True);
if (file) {
path = FindImage(wPreferences.icon_path, file);
- if (path) {
- image = RLoadImage(scr->rcontext, path, 0);
- if (!image)
- wwarning(_("could not load default icon
\"%s\":%s"),
- file, RMessageForError(RErrorCode));
- wfree(path);
- } else {
+ if (path)
+ image = get_rimage_from_file(scr, path,
wPreferences.icon_size);
+
+ if (!image)
wwarning(_("could not find default icon \"%s\""), file);
- }
- }
- /* Validate the icon size */
- image = wIconValidateIconSize(image, wPreferences.icon_size);
+ wfree(file);
+ }
return image;
}
Tomorrow I will write the patches.
Thanks for your comments, I re-check my code...
Best regards,
kix
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to [email protected].