From 11a4ecc32aaec519182e5d1c1f60ebba68d0547a Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 29 Dec 2007 21:37:04 +0100 Subject: [PATCH] optimize loop --- widgets/netwmicon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/widgets/netwmicon.c b/widgets/netwmicon.c index a4cfe5706..6df49ffd3 100644 --- a/widgets/netwmicon.c +++ b/widgets/netwmicon.c @@ -48,10 +48,8 @@ netwmicon_draw(Widget *widget, DrawCtx *ctx, int offset, return 0; for(r = globalconf.rules; r; r = r->next) - if(client_match_rule(sel, r)) + if(r->icon && client_match_rule(sel, r)) { - if(!r->icon) - continue; icon = r->icon; width = draw_get_image_width(icon); height = draw_get_image_height(icon);