1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

wmaker: dock.c possible null pointer dereference

As reported by cppcheck:
[src/dock.c:568] -> [src/dock.c:571]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null.

The aicon test is useless, the patch is removing it.
This commit is contained in:
David Maciejak
2014-07-27 14:22:31 +08:00
committed by Carlos R. Mafra
parent f6b9fc8870
commit f5cb2f3d1c

View File

@@ -568,7 +568,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry *entry)
if (aicon->icon->selected) if (aicon->icon->selected)
wIconSelect(aicon->icon); wIconSelect(aicon->icon);
if (aicon && aicon->attracted && aicon->command) { if (aicon->attracted && aicon->command) {
aicon->attracted = 0; aicon->attracted = 0;
if (aicon->icon->shadowed) { if (aicon->icon->shadowed) {
aicon->icon->shadowed = 0; aicon->icon->shadowed = 0;