optimize loop

This commit is contained in:
Julien Danjou 2007-12-29 21:37:04 +01:00
parent eb65306127
commit 11a4ecc32a
1 changed files with 1 additions and 3 deletions

View File

@ -48,10 +48,8 @@ netwmicon_draw(Widget *widget, DrawCtx *ctx, int offset,
return 0; return 0;
for(r = globalconf.rules; r; r = r->next) 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; icon = r->icon;
width = draw_get_image_width(icon); width = draw_get_image_width(icon);
height = draw_get_image_height(icon); height = draw_get_image_height(icon);