mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-24 01:06:59 +00:00
Fix possible crash with nullptr screen.
This commit is contained in:
parent
7cfb122dea
commit
12614ab68c
@ -287,7 +287,9 @@ void MainMenu::initResetScaleButton() {
|
||||
handle->screen()
|
||||
) | rpl::then(
|
||||
Core::QtSignalProducer(handle, &QWindow::screenChanged)
|
||||
) | rpl::map([](QScreen *screen) {
|
||||
) | rpl::filter([](QScreen *screen) {
|
||||
return screen != nullptr;
|
||||
}) | rpl::map([](QScreen * screen) {
|
||||
return rpl::single(
|
||||
screen->availableGeometry()
|
||||
) | rpl::then(
|
||||
|
Loading…
Reference in New Issue
Block a user