mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix(RemoteConferenceEventHandler): remove listener only if core exists + add me in main db tests
This commit is contained in:
parent
e62d8fffd7
commit
c9c4ab5536
3 changed files with 7 additions and 2 deletions
|
|
@ -233,7 +233,12 @@ Object(*new RemoteConferenceEventHandlerPrivate) {
|
|||
|
||||
RemoteConferenceEventHandler::~RemoteConferenceEventHandler () {
|
||||
L_D();
|
||||
d->conf->getCore()->getPrivate()->unregisterListener(d);
|
||||
|
||||
try {
|
||||
d->conf->getCore()->getPrivate()->unregisterListener(d);
|
||||
} catch (const bad_weak_ptr &) {
|
||||
// Unable to unregister listener here. Core is destroyed and the listener doesn't exist.
|
||||
}
|
||||
|
||||
if (d->lev)
|
||||
unsubscribe();
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ shared_ptr<Core> CoreAccessor::getCore () const {
|
|||
shared_ptr<Core> core = d->core.lock();
|
||||
if (!core) {
|
||||
lWarning() << "Unable to get valid core instance.";
|
||||
throw std::bad_weak_ptr();
|
||||
throw bad_weak_ptr();
|
||||
}
|
||||
|
||||
return core;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Reference in a new issue