Commit 83b7d25e authored by Ghislain MARY's avatar Ghislain MARY

Prevent crash when terminating a paused call.

parent 7af6406a
......@@ -383,11 +383,21 @@ namespace Linphone.Model
/// </summary>
public void EndCurrentCall()
{
if (LinphoneCore.GetCallsNb() > 0)
LinphoneCall call = LinphoneCore.GetCurrentCall();
if (call != null)
{
LinphoneCall call = LinphoneCore.GetCurrentCall();
LinphoneCore.TerminateCall(call);
}
else
{
foreach (LinphoneCall lCall in LinphoneCore.GetCalls())
{
if (lCall.GetState() == LinphoneCallState.Paused)
{
LinphoneCore.TerminateCall(lCall);
}
}
}
}
/// <summary>
......
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