mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix possible crash with nullptr screen.
This commit is contained in:
parent
7cfb122dea
commit
12614ab68c
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue