diff options
author | Aaron McCarthy <aaron.mccarthy@jollamobile.com> | 2013-11-05 17:20:16 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-07 01:41:35 +0100 |
commit | e3db0e405d771e11fa6b4f98d39e90b32db9d612 (patch) | |
tree | 6b065a333ca65ac788c8c0c8114616cc67245989 | |
parent | 73bb77dc21ef3d9d80563184e35fd2eb00c7b55b (diff) | |
download | qtlocation-e3db0e405d771e11fa6b4f98d39e90b32db9d612.tar.gz |
Fix occasional crash in Geoclue plugin.
There is no need to create a DBus proxy object for Geoclue.Position when
the service name and path are empty.
Change-Id: I21ca2190aa929fa77e823c5cc7056ceb74f644eb
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r-- | src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp index 48c731e8..9558772a 100644 --- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp +++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp @@ -455,6 +455,9 @@ void QGeoPositionInfoSourceGeoclueMaster::positionProviderChanged(const QByteArr if (m_pos) cleanupPositionSource(); + if (service.isEmpty() || path.isEmpty()) + return; + m_pos = geoclue_position_new(service.constData(), path.constData()); if (m_pos) { if (m_running) { |