From f5cb2f3d1c2301c9aaee6ea1441b8706b2b1cc3b Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Sun, 27 Jul 2014 14:22:31 +0800 Subject: [PATCH] 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. --- src/dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dock.c b/src/dock.c index 8b93a506..6144c75d 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;