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:
committed by
Carlos R. Mafra
parent
ad373ef0dd
commit
219315aa58
@@ -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,13 +206,13 @@ void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance
|
||||
|
||||
if (!iconPath)
|
||||
wfree(tmp);
|
||||
}
|
||||
|
||||
if (iconPath) {
|
||||
wApplicationSaveIconPathFor(iconPath, wm_instance, wm_class);
|
||||
wfree(iconPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WApplication *wApplicationCreate(WWindow * wwin)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user