Fix crash when network information backend is not available

This commit is contained in:
Martchus 2024-02-17 01:41:23 +01:00
parent 0c15936119
commit 00d3a8198a
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ void SyncthingConnection::handleMeteredConnection()
{
#ifdef SYNCTHINGCONNECTION_SUPPORT_METERED
const auto *const networkInformation = QNetworkInformation::instance();
if (!networkInformation->supports(QNetworkInformation::Feature::Metered)) {
if (!networkInformation || !networkInformation->supports(QNetworkInformation::Feature::Metered)) {
return;
}
if (networkInformation->isMetered() && m_pausingOnMeteredConnection) {