diff --git a/src/backends/drm/drm_connector.cpp b/src/backends/drm/drm_connector.cpp index 6f08327ceb..6a1bdd3200 100644 --- a/src/backends/drm/drm_connector.cpp +++ b/src/backends/drm/drm_connector.cpp @@ -371,7 +371,7 @@ QList> DrmConnector::generateCommonModes() { QList> 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();