Fix crash when changing Pane widgets -- #7198
authorRobin Gareus <robin@gareus.org>
Sun, 8 Jan 2017 11:29:30 +0000 (12:29 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 8 Jan 2017 11:39:07 +0000 (12:39 +0100)
commitcbf5f3d622e7956bcbf551231d8e8029ac5f004d
tree45594bbbad6160c61b8b5f98d0d5def505023fa9
parentd0596d815fba9c82f98774f2cec21208443ec99e
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".
libs/gtkmm2ext/gtkmm2ext/pane.h
libs/gtkmm2ext/pane.cc