forked from mia/Aegisub
Fix crash when slots disconnect from a signal in response to that signal
Originally committed to SVN as r5806.
This commit is contained in:
parent
ccebd521c6
commit
6a31f840a6
1 changed files with 5 additions and 2 deletions
|
@ -183,8 +183,11 @@ namespace detail {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SIGNALS_H_FOR_EACH_SIGNAL(...) \
|
#define SIGNALS_H_FOR_EACH_SIGNAL(...) \
|
||||||
for (typename super::SlotMap::iterator cur = slots.begin(); cur != slots.end(); ++cur) { \
|
for (typename super::SlotMap::iterator cur = slots.begin(); cur != slots.end();) { \
|
||||||
if (!Blocked(cur->first)) cur->second(__VA_ARGS__); \
|
if (Blocked(cur->first)) \
|
||||||
|
++cur; \
|
||||||
|
else \
|
||||||
|
(cur++)->second(__VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @class Signal
|
/// @class Signal
|
||||||
|
|
Loading…
Reference in a new issue