fix potential segfault in win_extents

This commit is contained in:
Christopher Jeffrey 2012-01-14 09:32:54 -06:00
parent b9dbf7701b
commit a6afff2c4a
1 changed files with 1 additions and 1 deletions

View File

@ -855,7 +855,7 @@ win_extents(Display *dpy, win *w) {
r.height = w->a.height + w->a.border_width * 2;
// check NUM_WINTYPES to prevent segfault
if (w->window_type
if (w->window_type >= 0
&& w->window_type < NUM_WINTYPES
&& win_type_shadow[w->window_type]) {
XRectangle sr;