Fix couple of possible crashes.

Fixes #24613.
This commit is contained in:
John Preston 2022-06-20 20:27:00 +04:00
parent 66e9c5ef16
commit 3c1663adeb
3 changed files with 5 additions and 2 deletions

View File

@ -3482,6 +3482,7 @@ void GroupCall::destroyController() {
DEBUG_LOG(("Call Info: Destroying call controller.."));
invalidate_weak_ptrs(&_instanceGuard);
_instance->stop();
crl::async([
instance = base::take(_instance),
done = _delegate->groupCallAddAsyncWaiter()
@ -3497,6 +3498,8 @@ void GroupCall::destroyScreencast() {
if (_screenInstance) {
DEBUG_LOG(("Call Info: Destroying call screen controller.."));
invalidate_weak_ptrs(&_screenInstanceGuard);
_screenInstance->stop();
crl::async([
instance = base::take(_screenInstance),
done = _delegate->groupCallAddAsyncWaiter()

@ -1 +1 @@
Subproject commit 7dd3cf86a3daa1ee8c1022930816cc8044d0ed5b
Subproject commit c2620d42ee6cff0c9fb078c1a6956c5c7fb6448e

@ -1 +1 @@
Subproject commit b305df8cc5c853b564ec0fe0b8b121c2a4e10b19
Subproject commit dbc0e87c8058b77d79c20a1c24e5c6d9fe8cacea