Commit 5d814532 authored by jehan's avatar jehan Committed by Simon Morlat

fix crash when call destroyed after core

parent 0d2daf11
......@@ -42,7 +42,7 @@ Imdn::Imdn (ChatRoom *chatRoom) : chatRoom(chatRoom) {
Imdn::~Imdn () {
stopTimer();
try {
try { //getCore may no longuer be available when deleting, specially in case of managed enviroment like java
chatRoom->getCore()->getPrivate()->unregisterListener(this);
} catch (const bad_weak_ptr &) {}
}
......
......@@ -883,7 +883,9 @@ CallSession::CallSession (CallSessionPrivate &p, const shared_ptr<Core> &core) :
CallSession::~CallSession () {
L_D();
getCore()->getPrivate()->unregisterListener(d);
try { //getCore may no longuer be available when deleting, specially in case of managed enviroment like java
getCore()->getPrivate()->unregisterListener(d);
} catch (const bad_weak_ptr &) {}
if (d->currentParams)
delete d->currentParams;
if (d->params)
......
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