Yet another pane pain: allow deleting children using forall_vfunc
authorRobin Gareus <robin@gareus.org>
Fri, 20 Jan 2017 02:13:41 +0000 (03:13 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 20 Jan 2017 02:13:41 +0000 (03:13 +0100)
commit6b5dce2c66554df2243d62ca06c93b9c9eefc8fa
treea6c24dcf966fc0cc1b99436f5ded799a0e3d003c
parent4ee8a0e9fc2a35441e2bb016f173adf5e521660d
Yet another pane pain: allow deleting children using forall_vfunc

We not only need to make sure the iterator remains valid, but also
the object pointed to.

Valgrind trace:
Invalid read of size 8
 Gtkmm2ext::Pane::forall_vfunc(int, void (*)(_GtkWidget*, void*), void*) (pane.cc:617)
 Gtk::Container_Class::forall_vfunc_callback(_GtkContainer*, int, void (*)(_GtkWidget*, void*), void*)
 gtk_container_destroy (gtkcontainer.c:1073)
 g_closure_invoke (gclosure.c:804)
...
 g_object_run_dispose (gobject.c:1084)
libs/gtkmm2ext/gtkmm2ext/pane.h
libs/gtkmm2ext/pane.cc