[gnome-maps/gnome-3-36] layersPopover: Fix crash when no aerial tiles defined
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-36] layersPopover: Fix crash when no aerial tiles defined
- Date: Thu, 3 Jun 2021 21:24:12 +0000 (UTC)
commit 22e32384f5d3623d8fdc8c330a0adcda3047cd7a
Author: Marcus Lundblad <ml update uu se>
Date: Thu Jun 3 23:22:56 2021 +0200
layersPopover: Fix crash when no aerial tiles defined
Fixes a crash when no aerial tiles is defined.
src/layersPopover.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/layersPopover.js b/src/layersPopover.js
index 45664823..74e37abc 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -97,13 +97,16 @@ var LayersPopover = GObject.registerClass({
source: MapSource.createStreetSource(),
widget: this._streetLayerImage,
lastLocation: { x: -1, y: -1, z: -1 }
- },
- aerial: {
+ }
+ };
+
+ if (Service.getService().tiles.aerial) {
+ this._layerPreviews.aerial = {
source: MapSource.createAerialSource(),
widget: this._aerialLayerImage,
lastLocation: { x: -1, y: -1, z: -1 }
- }
- };
+ };
+ }
// disable the map type switch buttons if aerial is unavailable
if (Service.getService().tiles.aerial) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]