summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-08-01 19:56:08 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-08-01 19:56:08 +0200
commitc8565bf4f3bf1def1bb9cd89955454c120fab9a1 (patch)
treecdab67cae6cd49cb580de0371c2f1d3e393b9044
parentf37aca15e9786a7192e36ea4b0295ab4dc12819f (diff)
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).
-rw-r--r--src/Fl_Flex.cxx3
1 files changed, 3 insertions, 0 deletions
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_);