From 08092d22b46892b65d560149d919e5c3917d1b9f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 8 May 2021 14:36:43 +0200 Subject: [PATCH] Prevent invalid frame/child size allocation --- libs/widgets/frame.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/widgets/frame.cc b/libs/widgets/frame.cc index 6b815510fc..466821fdd1 100644 --- a/libs/widgets/frame.cc +++ b/libs/widgets/frame.cc @@ -154,6 +154,10 @@ Frame::on_size_allocate (Allocation& alloc) child_alloc.set_height (alloc.get_height () - pb_t * 2); } + if (child_alloc.get_width () < 1 || child_alloc.get_height () < 1) { + return; + } + if (_w) { _w->size_allocate (child_alloc); }