Commit 7bc5d593 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Philippe Gorley

fix crash during incoming call

fix nullptr access during incoming call on ringaccount
due to a missplaced method call.

Change-Id: Ia226d9d8e53ae8143b42d9b08814b5448c8be95d
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent ea8c5921
......@@ -310,7 +310,6 @@ RingAccount::newIncomingCall(const std::string& from, const std::map<std::string
auto call_it = pendingSipCalls_.begin();
while (call_it != pendingSipCalls_.end()) {
auto call = call_it->call.lock();
call->updateDetails(details);
if (not call) {
RING_WARN("newIncomingCall: discarding deleted call");
call_it = pendingSipCalls_.erase(call_it);
......@@ -319,6 +318,7 @@ RingAccount::newIncomingCall(const std::string& from, const std::map<std::string
call_it->from_cert->issuer->getId().toString() == from)) {
RING_DBG("newIncomingCall: found matching call for %s", from.c_str());
pendingSipCalls_.erase(call_it);
call->updateDetails(details);
return call;
} else {
++call_it;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment