don't create gigantic images when XGetGeometry fails in FbTk::FbPixmap::copy
markt markt
2 files changed,
11 insertions(+),
7 deletions(-)
M
src/FbTk/FbPixmap.cc
→
src/FbTk/FbPixmap.cc
@@ -166,13 +166,14 @@ int x, y;
unsigned int border_width, bpp; unsigned int new_width, new_height; - XGetGeometry(display(), - pm, - &root, - &x, &y, - &new_width, &new_height, - &border_width, - &bpp); + if (!XGetGeometry(display(), + pm, + &root, + &x, &y, + &new_width, &new_height, + &border_width, + &bpp)) + return; if (depth == 0) depth = bpp;