mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Fix possible crash with nullptr screen.
This commit is contained in:
@@ -287,7 +287,9 @@ void MainMenu::initResetScaleButton() {
|
|||||||
handle->screen()
|
handle->screen()
|
||||||
) | rpl::then(
|
) | rpl::then(
|
||||||
Core::QtSignalProducer(handle, &QWindow::screenChanged)
|
Core::QtSignalProducer(handle, &QWindow::screenChanged)
|
||||||
) | rpl::map([](QScreen *screen) {
|
) | rpl::filter([](QScreen *screen) {
|
||||||
|
return screen != nullptr;
|
||||||
|
}) | rpl::map([](QScreen * screen) {
|
||||||
return rpl::single(
|
return rpl::single(
|
||||||
screen->availableGeometry()
|
screen->availableGeometry()
|
||||||
) | rpl::then(
|
) | rpl::then(
|
||||||
|
Reference in New Issue
Block a user