Commit d812d1df authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Guard against null QScreen

screenAt can give a nullptr, don't crash in that case

BUG: 442424
parent 6e7affe3
......@@ -83,7 +83,13 @@ struct FullScreenBarPrivate {
*/
QRect slideInTriggerRect() const
{
QRect rect = QGuiApplication::screenAt(QCursor::pos())->geometry();
const QScreen *screen = QGuiApplication::screenAt(QCursor::pos());
if (!screen) {
return {};
}
QRect rect = screen->geometry();
// Take parent widget position into account because it may not be at
// the top of the screen, for example when the save bar warning is
// shown.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment