Index: glib/glibmm/main.cc =================================================================== RCS file: /cvs/gnome/glibmm/glib/glibmm/main.cc,v retrieving revision 1.6 diff -u -3 -r1.6 main.cc --- glib/glibmm/main.cc 20 Mar 2004 14:38:40 -0000 1.6 +++ glib/glibmm/main.cc 23 Jul 2004 14:12:06 -0000 @@ -62,14 +62,16 @@ { SourceConnectionNode *const self = static_cast(data); - // if there is no object, this call was triggered from destroy_notify_handler(). + // if there is no object, this call was triggered from destroy_notify_handler(), + // because we set self->source_ to 0 there: if (self->source_) { GSource* s = self->source_; self->source_ = 0; g_source_destroy(s); - delete self; + // Destroying the object triggers execution of destroy_notify_handler(), + // eiter immediately or later, so we leave that to do the deletion. } return 0; @@ -80,8 +82,7 @@ { SourceConnectionNode *const self = static_cast(data); - // if there is no object, this call was triggered from notify(). - if (self->source_) + if (self) { // The GLib side is disconnected now, thus the GSource* is no longer valid. self->source_ = 0;