From a918292547cfb154dec26eeabdf70b4ff026f6be Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 28 Oct 2022 17:37:18 +0200 Subject: Fix removal and deletion of the resizable() of Fl_Group If the resizable() of an Fl_Group is deleted it is automatically removed from the group. New: to avoid dangling resizable() pointers the resizable widget is set to the group itself. --- src/Fl_Group.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index 99b442a4e..aa663919f 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -501,6 +501,7 @@ void Fl_Group::remove(int index) { if (index < 0 || index >= children_) return; Fl_Widget &o = *child(index); if (&o == savedfocus_) savedfocus_ = 0; + if (&o == resizable_) resizable_ = this; if (o.parent_ == this) { // this should always be true o.parent_ = 0; } -- cgit v1.2.3