Commit c9c4ab55 authored by Ronan's avatar Ronan

fix(RemoteConferenceEventHandler): remove listener only if core exists + add `me` in main db tests

parent e62d8fff
......@@ -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;
......
No preview for this file type
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