watch out for 0x0 icons, and skip them
authorDana Jansens <danakj@orodu.net>
Mon, 2 Jun 2003 23:10:27 +0000 (23:10 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 2 Jun 2003 23:10:27 +0000 (23:10 +0000)
openbox/client.c

index 0f2519c..0cfd6c2 100644 (file)
@@ -1336,6 +1336,8 @@ void client_update_icons(Client *self)
            w = self->icons[j].width = data[i++];
            h = self->icons[j].height = data[i++];
 
+            if (w*h == 0) continue;
+
            self->icons[j].data = g_new(pixel32, w * h);
             for (x = 0, y = 0, t = 0; t < w * h; ++t, ++x, ++i) {
                 if (x >= w) {