Fix crash when an incoming call times out.

This commit is contained in:
Ghislain MARY 2018-02-09 14:48:33 +01:00
parent c27c1b0767
commit 3cc6e3ef7d

View file

@ -86,7 +86,9 @@ bool CorePrivate::isAlreadyInCallWithAddress (const Address &addr) const {
}
void CorePrivate::iterateCalls (time_t currentRealTime, bool oneSecondElapsed) const {
for (const auto &call : calls) {
// Make a copy of the list af calls because it may be altered during calls to the Call::iterate method
list<shared_ptr<Call>> savedCalls(calls);
for (const auto &call : savedCalls) {
call->getPrivate()->iterate(currentRealTime, oneSecondElapsed);
}
}