mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix base::binary_guard.
This commit is contained in:
parent
5824afa941
commit
a58c082cfa
1 changed files with 3 additions and 3 deletions
|
@ -57,10 +57,10 @@ inline void binary_guard::kill() {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void binary_guard::destroy() {
|
inline void binary_guard::destroy() {
|
||||||
if (_bothAlive) {
|
if (const auto both = base::take(_bothAlive)) {
|
||||||
auto old = true;
|
auto old = true;
|
||||||
if (!_bothAlive->compare_exchange_strong(old, false)) {
|
if (!both->compare_exchange_strong(old, false)) {
|
||||||
delete _bothAlive;
|
delete both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue