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)
|
void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance, char *wm_class)
|
||||||
{
|
{
|
||||||
char *iconPath = NULL;
|
char *iconPath = NULL;
|
||||||
if (strstr(path, ".app")) {
|
char *tmp = NULL;
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
|
if (strstr(path, ".app")) {
|
||||||
tmp = wmalloc(strlen(path) + 16);
|
tmp = wmalloc(strlen(path) + 16);
|
||||||
|
|
||||||
if (scr->flags.supports_tiff) {
|
if (scr->flags.supports_tiff) {
|
||||||
@@ -206,12 +206,12 @@ void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance
|
|||||||
|
|
||||||
if (!iconPath)
|
if (!iconPath)
|
||||||
wfree(tmp);
|
wfree(tmp);
|
||||||
}
|
|
||||||
|
|
||||||
if (iconPath) {
|
if (iconPath) {
|
||||||
wApplicationSaveIconPathFor(iconPath, wm_instance, wm_class);
|
wApplicationSaveIconPathFor(iconPath, wm_instance, wm_class);
|
||||||
wfree(iconPath);
|
wfree(iconPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WApplication *wApplicationCreate(WWindow * wwin)
|
WApplication *wApplicationCreate(WWindow * wwin)
|
||||||
|
|||||||
Reference in New Issue
Block a user