backends/drm: Fix custom mode generation

maxSizeRefreshRate is uninitialized.

BUG: 463619
This commit is contained in:
Vlad Zahorodnii 2023-01-23 21:08:17 +02:00
parent 85b9bcc10c
commit e6d2a19857

View file

@ -371,7 +371,7 @@ QList<std::shared_ptr<DrmConnectorMode>> DrmConnector::generateCommonModes()
{
QList<std::shared_ptr<DrmConnectorMode>> ret;
QSize maxSize;
uint32_t maxSizeRefreshRate;
uint32_t maxSizeRefreshRate = 0;
for (const auto &mode : std::as_const(m_driverModes)) {
if (mode->size().width() >= maxSize.width() && mode->size().height() >= maxSize.height() && mode->refreshRate() >= maxSizeRefreshRate) {
maxSize = mode->size();