diff --git a/src/.mbtheme.c.swp b/src/.mbtheme.c.swp
index 1169406..7023843 100644
Binary files a/src/.mbtheme.c.swp and b/src/.mbtheme.c.swp differ
diff --git a/src/mbtheme.c b/src/mbtheme.c
index 9a40abd..df8513a 100644
--- a/src/mbtheme.c
+++ b/src/mbtheme.c
@@ -152,10 +152,14 @@ void theme_frame_icon_paint(MBTheme *t, Client *c,
}
}
+ if (img != NULL && (img->height == 0 || img->width == 0)) {
+ mb_pixbuf_img_free(t->wm->pb, img);
+ img = NULL;
+ }
if( img == NULL)
img = mb_pixbuf_img_clone(t->wm->pb, c->wm->img_generic_icon);
- if (img->width != 16 || img->height != 16)
+ if (img->width != 16 || img->height != 16)
{
MBPixbufImage *tmp_img;
tmp_img = mb_pixbuf_img_scale(t->wm->pb, img, 16, 16);