From 3cc6e3ef7d64bd021e673d53a7a692775fad748e Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 9 Feb 2018 14:48:33 +0100 Subject: [PATCH] Fix crash when an incoming call times out. --- src/core/core-call.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/core-call.cpp b/src/core/core-call.cpp index 44c6bacdd..5bc9912a7 100644 --- a/src/core/core-call.cpp +++ b/src/core/core-call.cpp @@ -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> savedCalls(calls); + for (const auto &call : savedCalls) { call->getPrivate()->iterate(currentRealTime, oneSecondElapsed); } }