Fix crash when _NET_WM_ICON is set but empty

This commit is contained in:
o9000
2017-04-27 09:04:16 +02:00
parent f351b6fd8e
commit 82776df9d6
2 changed files with 20 additions and 17 deletions

View File

@@ -277,6 +277,9 @@ int get_icon_count(gulong *data, int num)
gulong *get_best_icon(gulong *data, int icon_count, int num, int *iw, int *ih, int best_icon_size)
{
if (icon_count < 1 || num < 1)
return NULL;
int width[icon_count], height[icon_count], pos, i, w, h;
gulong *icon_data[icon_count];