mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 04:25:42 +02:00
module/xwindow: don't crash if there is no active window
This commit is contained in:
parent
41c53a7b2f
commit
c5309abbd0
1 changed files with 5 additions and 0 deletions
|
@ -57,6 +57,11 @@ update_active_window(struct private *m)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xcb_get_property_value_length(r) != sizeof(m->active_win)) {
|
||||||
|
free(r);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(sizeof(m->active_win) == xcb_get_property_value_length(r));
|
assert(sizeof(m->active_win) == xcb_get_property_value_length(r));
|
||||||
memcpy(&m->active_win, xcb_get_property_value(r), sizeof(m->active_win));
|
memcpy(&m->active_win, xcb_get_property_value(r), sizeof(m->active_win));
|
||||||
free(r);
|
free(r);
|
||||||
|
|
Loading…
Add table
Reference in a new issue