diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-28 14:12:23 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-28 13:19:55 +0000 |
commit | a1c8a23c52087300ffd7bf7e61bdfaab8ff6ecc9 (patch) | |
tree | 50e46a60ccc48b76a7420a37f2a98ff0f8c60026 | |
parent | 2521e5fe81a4b1f2d5b0819ef4c7f239c8fc55b9 (diff) | |
download | qtlocation-a1c8a23c52087300ffd7bf7e61bdfaab8ff6ecc9.tar.gz |
Fix null pointer exception
This patch fixes a null pointer exception happening when the application
starts without network and then the network becomes available
Change-Id: Iedeacf8fb8f350dfa92c05c1d2e16f62199ca5fd
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/plugins/geoservices/osm/qgeotileproviderosm.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/geoservices/osm/qgeotileproviderosm.cpp b/src/plugins/geoservices/osm/qgeotileproviderosm.cpp index 1989c44f..0d617368 100644 --- a/src/plugins/geoservices/osm/qgeotileproviderosm.cpp +++ b/src/plugins/geoservices/osm/qgeotileproviderosm.cpp @@ -183,7 +183,7 @@ void QGeoTileProviderOsm::onResolutionError(TileProvider *provider) { Q_UNUSED(provider) // provider and m_provider are the same at this point. m_status is Resolving. - if (m_provider->isInvalid()) { + if (!m_provider || m_provider->isInvalid()) { m_provider = nullptr; m_status = Resolved; if (m_providerId >= m_providerList.size() -1) { // no hope left |