Commit 68ca9907 authored by Ghislain MARY's avatar Ghislain MARY

Fix invalid read when a CallSession tries to notify a Call that has been destroyed.

parent bbd6c58d
......@@ -19,6 +19,7 @@
#include "conference/local-conference-p.h"
#include "conference/participant-p.h"
#include "conference/session/media-session-p.h"
#include "local-conference-call-p.h"
// =============================================================================
......@@ -50,6 +51,13 @@ LocalConferenceCall::LocalConferenceCall (
participant->getPrivate()->getSession()->configure(direction, cfg, op, from, to);
}
LocalConferenceCall::~LocalConferenceCall () {
L_D();
auto session = d->getActiveSession();
if (session)
session->getPrivate()->setCallSessionListener(nullptr);
}
shared_ptr<Core> LocalConferenceCall::getCore () const {
return Call::getCore();
}
......
......@@ -47,6 +47,7 @@ public:
SalCallOp *op,
const MediaSessionParams *msp
);
virtual ~LocalConferenceCall ();
std::shared_ptr<Core> getCore () const;
......
......@@ -19,6 +19,7 @@
#include "conference/remote-conference-p.h"
#include "conference/participant-p.h"
#include "conference/session/media-session-p.h"
#include "remote-conference-call-p.h"
// =============================================================================
......@@ -50,6 +51,13 @@ RemoteConferenceCall::RemoteConferenceCall (
participant->getPrivate()->getSession()->configure(direction, cfg, op, from, to);
}
RemoteConferenceCall::~RemoteConferenceCall () {
L_D();
auto session = d->getActiveSession();
if (session)
session->getPrivate()->setCallSessionListener(nullptr);
}
shared_ptr<Core> RemoteConferenceCall::getCore () const {
return Call::getCore();
}
......
......@@ -42,6 +42,7 @@ public:
SalCallOp *op,
const MediaSessionParams *msp
);
virtual ~RemoteConferenceCall ();
std::shared_ptr<Core> getCore () const;
......
......@@ -43,6 +43,8 @@ class LINPHONE_PUBLIC CallSession : public Object, public CoreAccessor {
friend class ClientGroupChatRoomPrivate;
friend class Conference;
friend class CorePrivate;
friend class LocalConferenceCall;
friend class RemoteConferenceCall;
friend class ServerGroupChatRoom;
friend class ServerGroupChatRoomPrivate;
......
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