watch out for 0x0 icons, and skip them
This commit is contained in:
parent
465e32b7c8
commit
754391ea4d
1 changed files with 2 additions and 0 deletions
|
@ -1336,6 +1336,8 @@ void client_update_icons(Client *self)
|
||||||
w = self->icons[j].width = data[i++];
|
w = self->icons[j].width = data[i++];
|
||||||
h = self->icons[j].height = data[i++];
|
h = self->icons[j].height = data[i++];
|
||||||
|
|
||||||
|
if (w*h == 0) continue;
|
||||||
|
|
||||||
self->icons[j].data = g_new(pixel32, w * h);
|
self->icons[j].data = g_new(pixel32, w * h);
|
||||||
for (x = 0, y = 0, t = 0; t < w * h; ++t, ++x, ++i) {
|
for (x = 0, y = 0, t = 0; t < w * h; ++t, ++x, ++i) {
|
||||||
if (x >= w) {
|
if (x >= w) {
|
||||||
|
|
Loading…
Reference in a new issue