mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
fix crash when gps source is not available (e.g. missing QT plugins)
This commit is contained in:
parent
65182a2775
commit
90cbcc92b1
@ -39,7 +39,7 @@ QGeoPositionInfoSource *QgsQuickPositionKit::gpsSource()
|
||||
// this should give us "true" position source
|
||||
// on Linux it comes from Geoclue library
|
||||
std::unique_ptr<QGeoPositionInfoSource> source( QGeoPositionInfoSource::createDefaultSource( nullptr ) );
|
||||
if ( source->error() != QGeoPositionInfoSource::NoError )
|
||||
if ( ( !source ) || ( source->error() != QGeoPositionInfoSource::NoError ) )
|
||||
{
|
||||
QgsMessageLog::logMessage( QStringLiteral( "%1 (%2)" )
|
||||
.arg( tr( "Unable to create default GPS Position Source" ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user