2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix crash in radiobutton destruction.

It crashed if the button was destroyed from group _changedCallback.
This commit is contained in:
John Preston
2018-12-05 13:55:56 +04:00
parent b10ccce44a
commit efe3dfad5c
13 changed files with 165 additions and 119 deletions

View File

@@ -191,9 +191,7 @@ bool SectionWithToggle::toggled() const {
rpl::producer<bool> SectionWithToggle::toggledValue() const {
if (_toggle) {
return rpl::single(
_toggle->checked()
) | rpl::then(base::ObservableViewer(_toggle->checkedChanged));
return _toggle->checkedValue();
}
return rpl::never<bool>();
}