From c8565bf4f3bf1def1bb9cd89955454c120fab9a1 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 1 Aug 2022 19:56:08 +0200 Subject: Fix Fl_Flex unsetting of set_size() Don't add the widget to the array if size == 0 (unset) but it has not been in the array (or it's called twice). --- src/Fl_Flex.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/Fl_Flex.cxx b/src/Fl_Flex.cxx index ac1a8551f..e25741a03 100644 --- a/src/Fl_Flex.cxx +++ b/src/Fl_Flex.cxx @@ -287,6 +287,9 @@ void Fl_Flex::set_size(Fl_Widget *w, int size) { return; } + if (size == 0) + return; + // add to array of fixed size widgets if (set_size_size_ == set_size_alloc_) { set_size_alloc_ = alloc_size(set_size_alloc_); -- cgit v1.2.3