Commit 6dbf40c2 authored by jehan's avatar jehan Committed by jehan

fix crash when call destroyed after core

parent dfbf97d7
......@@ -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 &) {}
}
......
......@@ -915,7 +915,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