diff options
-rw-r--r-- | qt-models/gpslistmodel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-models/gpslistmodel.cpp b/qt-models/gpslistmodel.cpp index 5fa7d1081..1cb6c8271 100644 --- a/qt-models/gpslistmodel.cpp +++ b/qt-models/gpslistmodel.cpp @@ -11,7 +11,10 @@ GpsListModel::GpsListModel() void GpsListModel::update() { - QVector<gpsTracker> trackers = QVector<gpsTracker>::fromList(GpsLocation::instance()->currentGPSInfo().values()); + GpsLocation *glp = GpsLocation::instance(); + if (!glp) + return; + QVector<gpsTracker> trackers = QVector<gpsTracker>::fromList(glp->currentGPSInfo().values()); beginResetModel(); m_gpsFixes = trackers; endResetModel(); |