*** D:\gerrit\technology\gui\sandbox\packages\external\boost\libs\signals\src\signal_base.cpp.orig 2012-06-22 10:34:30.000000000 -0500 --- D:\gerrit\technology\gui\sandbox\packages\external\boost\libs\signals\src\signal_base.cpp.modified 2012-06-22 10:38:58.000000000 -0500 *************** *** 141,153 **** --- 141,159 ---- // we can come back later to remove the iterator if (self->call_depth > 0) { self->flags.delayed_disconnect = true; } else { // Just remove the slot now, it's safe + // There is a chance that the binding has the last reference to + // the signal, and destroying it will destroy the signal. To prevent + // this from causing a problem keep a local copy of the binding + // during it's removal from the slot list. + boost::any keep_alive = (*slot)->second; self->slots_.erase(*slot); + return; } } } void signal_base_impl::remove_disconnected_slots() const { slots_.remove_disconnected_slots(); }