diff --git a/src/util/window.c b/src/util/window.c index 1576703..b12df4c 100644 --- a/src/util/window.c +++ b/src/util/window.c @@ -414,6 +414,8 @@ cairo_surface_t *get_window_thumbnail_ximage(Window win, size_t size, gboolean u fw = tw; ox = oy = 0; } + if (!w || !h || !tw || !th || !fw) + goto err0; XShmSegmentInfo shminfo; XImage *ximg;