From fbaac5321e741324e1e6aa8ed8475541a2ed0268 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 28 Sep 2023 18:20:36 +0200 Subject: Don't crash when the map group cannot be found. --- gis-observation-map | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3