View | Details | Raw Unified
Collapse All | Expand All

(-) glib/glibmm/main.cc (-4 / +5 lines)
 Lines 62-75    Link Here 
{
{
  SourceConnectionNode *const self = static_cast<SourceConnectionNode*>(data);
  SourceConnectionNode *const self = static_cast<SourceConnectionNode*>(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_)
  if (self->source_)
  {
  {
    GSource* s = self->source_;  
    GSource* s = self->source_;  
    self->source_ = 0;
    self->source_ = 0;
    g_source_destroy(s);
    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;
  return 0;
 Lines 80-87    Link Here 
{
{
  SourceConnectionNode *const self = static_cast<SourceConnectionNode*>(data);
  SourceConnectionNode *const self = static_cast<SourceConnectionNode*>(data);
  // if there is no object, this call was triggered from notify().
  if (self)
  if (self->source_)
  {
  {
    // The GLib side is disconnected now, thus the GSource* is no longer valid.
    // The GLib side is disconnected now, thus the GSource* is no longer valid.
    self->source_ = 0;
    self->source_ = 0;