mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-29 01:52:48 +00:00
Fix crash in theme applying.
This commit is contained in:
parent
7ec4d9af3e
commit
a949c5e287
@ -909,7 +909,11 @@ void KeepApplied() {
|
||||
if (!AreTestingTheme()) {
|
||||
return;
|
||||
} else if (instance->applying.overrideKeep) {
|
||||
instance->applying.overrideKeep();
|
||||
// This callback will be destroyed while running.
|
||||
// And it won't be able to safely access captures after that.
|
||||
// So we save it on stack for the time while it is running.
|
||||
const auto saved = base::take(instance->applying.overrideKeep);
|
||||
saved();
|
||||
return;
|
||||
}
|
||||
const auto path = instance->applying.pathAbsolute;
|
||||
|
Loading…
Reference in New Issue
Block a user