Fix crash on multiple end calls

This commit is contained in:
Julien Wadel 2021-10-14 19:15:43 +02:00
parent 83a52a3929
commit 8d9c3d28df

View file

@ -448,8 +448,10 @@ void CallsListModel::handleCallStateChanged (const shared_ptr<linphone::Call> &c
case linphone::Call::State::End:
case linphone::Call::State::Error:{
CallModel * model = &call->getData<CallModel>("call-model");
model->callEnded();
if(call->dataExists("call-model")) {
CallModel * model = &call->getData<CallModel>("call-model");
model->callEnded();
}
removeCall(call);
} break;
case linphone::Call::State::StreamsRunning: {