Skip to content

Commit

Permalink
Merge pull request #516 from opengisch/fix-468
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored Apr 20, 2023
2 parents a1a3d4b + 207aed1 commit 7a80de6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qfieldsync/gui/layers_config_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,11 @@ def _on_message_bus_messaged(self, msg: str) -> None:
if msg != "layer_config_saved":
return

for layer_source in self.layer_sources:
layer_source.read_layer()
for layer_source in self.layer_sources.copy():
try:
layer_source.read_layer()
except RuntimeError:
self.layer_sources.remove(layer_source)

# quite ugly workaround, but this method sometimes operates on deleted objects,
# so we need to make sure we don't get exceptions
Expand Down

0 comments on commit 7a80de6

Please sign in to comment.