diff --git a/src/modules/locale/GeoIPXML.cpp b/src/modules/locale/GeoIPXML.cpp index a9aa43f76..0fb5359f3 100644 --- a/src/modules/locale/GeoIPXML.cpp +++ b/src/modules/locale/GeoIPXML.cpp @@ -42,8 +42,14 @@ GeoIPXML::processReply( const QByteArray& data ) for ( int it = 0; it < tzElements.length(); ++it ) { auto e = tzElements.at(it).toElement(); - return splitTZString( e.text() ); + auto tz = splitTZString( e.text() ); + if ( !tz.first.isEmpty() ) + return tz; } + + // None of them valid + cWarning() << "GeopIP XML had no recognizable timezone"; + return qMakePair( QString(), QString() ); } else { @@ -51,5 +57,4 @@ GeoIPXML::processReply( const QByteArray& data ) } return qMakePair( QString(), QString() ); - }