Ticket #7015: signal_base.patch

File signal_base.patch, 1.1 KB (added by Nick Mayer <nick.mayer@…>, 10 years ago)

Patch in the description of the issue

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