[gnome-maps/gnome-3-36] mapView: Don't try to set aerial tiles if not available
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-36] mapView: Don't try to set aerial tiles if not available
- Date: Thu, 27 May 2021 21:33:52 +0000 (UTC)
commit bcd2012cd26d369f7bf85a3caa674235c74f54b0
Author: Marcus Lundblad <ml update uu se>
Date: Thu May 27 23:12:34 2021 +0200
mapView: Don't try to set aerial tiles if not available
Safe-guard agains setting the aerial tile source
if it's not available in the service file.
This avoid a crash if aerial was saved as last-used
map type in gsettings and at next startup the service
has dropped support.
src/mapView.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index 3c27cdf7..b034c241 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -322,7 +322,7 @@ var MapView = GObject.registerClass({
this._mapType = mapType;
if (mapType !== MapType.LOCAL) {
- if (mapType === MapType.AERIAL)
+ if (mapType === MapType.AERIAL && Service.getService().tiles.aerial)
this.view.map_source = MapSource.createAerialSource();
else
this.view.map_source = MapSource.createStreetSource();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]