Commit a59bf595 authored by DanmeiChen's avatar DanmeiChen
Browse files

fix crash for ios

parent c77907ac
......@@ -166,7 +166,9 @@ void Core::onStopAsyncBackgroundTaskStarted() {
d->stopAsyncEndEnabled = false;
function<void()> stopAsyncEnd = [d]() {
_linphone_core_stop_async_end(d->getCCore());
if (linphone_core_get_global_state(d->getCCore()) == LinphoneGlobalShutdown) {
_linphone_core_stop_async_end(d->getCCore());
}
};
function<void()> enableStopAsyncEnd = [d]() {
d->stopAsyncEndEnabled = true;
......
......@@ -172,7 +172,6 @@ void IosPlatformHelpers::start (std::shared_ptr<LinphonePrivate::Core> core) {
void IosPlatformHelpers::stop () {
mStart = false;
[mHandler dealloc];
ms_message("IosPlatformHelpers is fully stopped");
}
......@@ -324,6 +323,8 @@ void IosPlatformHelpers::onLinphoneCoreStop() {
ms_message("[IosPlatformHelpers] Auto core.iterate() stopped");
}
// To avoid trigger callbacks of mHandler after linphone core stop
[mHandler dealloc];
getSharedCoreHelpers()->onLinphoneCoreStop();
}
......
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