1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 05:48:01 +01:00

WindowMaker: Check iconPath variable only if needed

The variable iconPath should only checked inside the if block,
because outside is never initialized.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-04-14 12:11:34 +02:00
committed by Carlos R. Mafra
parent ad373ef0dd
commit 219315aa58

View File

@@ -185,9 +185,9 @@ void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char *wm_cla
void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance, char *wm_class)
{
char *iconPath = NULL;
if (strstr(path, ".app")) {
char *tmp;
char *tmp = NULL;
if (strstr(path, ".app")) {
tmp = wmalloc(strlen(path) + 16);
if (scr->flags.supports_tiff) {
@@ -206,11 +206,11 @@ void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance
if (!iconPath)
wfree(tmp);
}
if (iconPath) {
wApplicationSaveIconPathFor(iconPath, wm_instance, wm_class);
wfree(iconPath);
if (iconPath) {
wApplicationSaveIconPathFor(iconPath, wm_instance, wm_class);
wfree(iconPath);
}
}
}