aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-09-28 18:20:36 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-09-28 18:20:36 +0200
commitfbaac5321e741324e1e6aa8ed8475541a2ed0268 (patch)
treedfe3c9676b84c4f9cf641d2ca0657770ec8c7452
parent1dbe21e4ce0f9b0e276a23e2cd148c668e075534 (diff)
Don't crash when the map group cannot be found.
-rwxr-xr-xgis-observation-map2
1 files changed, 2 insertions, 0 deletions
diff --git a/gis-observation-map b/gis-observation-map
index fbd9146..c1ac22e 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -879,6 +879,8 @@ if args.topo_basedir is not None and projectInstance is not None:
for topo in topo_maps:
minScale = None
rootGroup = QgsProject.instance().layerTreeRoot().findGroup(topo)
+ if rootGroup is None:
+ continue
if topo in idxContains.keys() and not idxContains[topo]:
# if the tileset doesn't entirely covers the area of interest,
# then uncheck the layer group and disable scale-based visibility