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.
---
src/dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/dock.c b/src/dock.c
index 8b93a50..6144c75 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -568,7 +568,7 @@ static void keepIconsCallback(WMenu *menu,
WMenuEntry *entry)
if (aicon->icon->selected)
wIconSelect(aicon->icon);
- if (aicon && aicon->attracted && aicon->command) {
+ if (aicon->attracted && aicon->command) {
aicon->attracted = 0;
if (aicon->icon->shadowed) {
aicon->icon->shadowed = 0;
0002-wmaker-dock.c-possible-null-pointer-dereference.patch
Description: Binary data
