This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  baecab089c053fa070ce962e02e599dd868dd4e5 (commit)
      from  e357e94896ba5dfb05dcc22b077a52e66eba4f9f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/baecab089c053fa070ce962e02e599dd868dd4e5

commit baecab089c053fa070ce962e02e599dd868dd4e5
Author: Christophe CURIS <[email protected]>
Date:   Tue Oct 9 00:20:44 2012 +0200

    Fixed crash when changing icon to non-existent file
    
    As found by Rodolfo, a crash could happen when changing an icon to
    a non-existent file. From his report:
    
    Steps To Reproduce
    1. Open the Settings box, for example for WMDock. (Right click on WMDock, 
Settings).
    2. In the "Icon Image" field, write some characters. For example 
"asdfasdfasd".
    3. Click in "OK". You get "Could not open specified icon file: 
GNUstep.tiffasdfasdfasd"
    4. Hit in "OK"
    5. Repeat 2,3,4 some times (sometimes 1, sometimes 2, sometimes 10).
    
    The problem came from freeing the previous icon but not updating
    the pointer, so if the new file did not exist it ended up with a
    fake-looking icon being used, hence possible crash.
    
    BTS: http://www.kix.es/mantis/view.php?id=1

diff --git a/src/icon.c b/src/icon.c
index e950a7d..0370d71 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;
        }

-----------------------------------------------------------------------

Summary of changes:
 src/icon.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to