From fc6888eee32f783c11faaa7de1c8ab079b833926 Mon Sep 17 00:00:00 2001 From: Nelis Oostens Date: Fri, 31 Jul 2015 08:22:20 +0200 Subject: [PATCH] Added sanity check to avoid making 0x0 window --- src/x11.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/x11.cc b/src/x11.cc index 48f5197f..b2442a8e 100644 --- a/src/x11.cc +++ b/src/x11.cc @@ -643,6 +643,11 @@ static void init_window(lua::state &l __attribute__((unused)), bool own) int b = border_inner_margin.get(l) + border_width.get(l) + border_outer_margin.get(l); + + /* Sanity check to avoid making an invalid 0x0 window */ + if (b == 0) { + b = 1; + } if (own_window_type.get(l) == TYPE_OVERRIDE) {