mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
wIconChangeImageFile don't update without file
The function wIconChangeImageFile mustn't update the icon if
no file is set.
This is a bug. To reproduce it:
1. Right click on dock icon. Select "Settings"
2. Erase the Icon Image contents (set empty)
3. Click "OK" -> Exit, no changes... no?
4. Right click on the same dock icon. Select "Settings"
5. Erase the Icon Image contents (set empty)
6. Click "OK" -> Crash
If wmaker don't crash, watch the file ~/GNUstep/Defaults/WMWindowAttributes,
the default icon ("*" has trash in the name). Probably something is not fine
at wIconUpdate.
This commit is contained in:
committed by
Carlos R. Mafra
parent
280e1e099d
commit
156d8ebfa5
@@ -376,16 +376,14 @@ Bool wIconChangeImageFile(WIcon * icon, char *file)
|
||||
char *path;
|
||||
int error = 0;
|
||||
|
||||
if (!file)
|
||||
return True;
|
||||
|
||||
if (icon->file_image) {
|
||||
RReleaseImage(icon->file_image);
|
||||
icon->file_image = NULL;
|
||||
}
|
||||
|
||||
if (!file) {
|
||||
wIconUpdate(icon);
|
||||
return True;
|
||||
}
|
||||
|
||||
path = FindImage(wPreferences.icon_path, file);
|
||||
|
||||
if (path && (image = RLoadImage(scr->rcontext, path, 0))) {
|
||||
|
||||
Reference in New Issue
Block a user