diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-08 12:29:30 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-08 12:39:07 +0100 |
commit | cbf5f3d622e7956bcbf551231d8e8029ac5f004d (patch) | |
tree | 45594bbbad6160c61b8b5f98d0d5def505023fa9 /libs/gtkmm2ext/gtkmm2ext | |
parent | d0596d815fba9c82f98774f2cec21208443ec99e (diff) |
Fix crash when changing Pane widgets -- #7198
Gtkmm2Ext::Pane::on_add() uses a pointer to a std::vector<> element
in the destroy notify callback. If the vector is modified, that pointer
becomes invalid.
Add 2 widgets "A", "B". remove "B", add another one "C".
Now if A is destroyed, notify_child_destroyed(PTR) points to
invalid memory and not to "A".
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/pane.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/pane.h b/libs/gtkmm2ext/gtkmm2ext/pane.h index 21fba2e9b1..d8367b36f6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pane.h +++ b/libs/gtkmm2ext/gtkmm2ext/pane.h @@ -55,7 +55,7 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container Child (Pane* p, Gtk::Widget* widget, uint32_t ms) : pane (p), w (widget), minsize (ms) {} }; - typedef std::vector<Child> Children; + typedef std::vector<Child*> Children; Pane (bool horizontal); ~Pane(); |