From a28833cfefac92dcfe357dcae9bd436ee5cdb8b2 Mon Sep 17 00:00:00 2001
From: David Maciejak <david.maciejak@gmail.com>
Date: Sun, 27 Jul 2014 14:22:31 +0800
Subject: [PATCH 2/4] 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 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;
-- 
1.8.3.2

