1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Fix a newly exposed bug, i3 indicating an active window that does not exists

This commit is contained in:
QC 2014-05-25 11:34:45 +02:00
parent 3a14ec9746
commit fb56250d18

View file

@ -647,8 +647,13 @@ void monitor_active ( workarea *mon )
&& type == XA_WINDOW && count > 0 )
{
XWindowAttributes *attr = window_get_attributes ( id );
monitor_dimensions ( screen, attr->x, attr->y, mon );
return;
// Window might not exists anymore.
// This could very well be a bug in i3.
if ( attr != NULL )
{
monitor_dimensions ( screen, attr->x, attr->y, mon );
return;
}
}
int x, y;