Commit 6aba8e56 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 445434: Gwenview crash when clicking "crop" button

BUG: 445434
parent 2272b304
Pipeline #137132 passed with stage
in 4 minutes and 2 seconds
......@@ -191,7 +191,10 @@ struct CropWidgetPrivate : public QWidget {
mCurrentImageComboBoxIndex = ratioComboBox->count() - 1; // We need to refer to this ratio later
addRatioToComboBox(QSizeF(1, 1), i18n("Square"));
addRatioToComboBox(ratio(QGuiApplication::screenAt(QCursor::pos())->geometry().size()), i18n("This Screen"));
const QScreen *screen = QGuiApplication::screenAt(QCursor::pos());
if (screen) {
addRatioToComboBox(ratio(screen->geometry().size()), i18n("This Screen"));
}
addSectionHeaderToComboBox(i18n("Landscape"));
for (const QSizeF &size : qAsConst(ratioList)) {
......
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