Skip to content

Commit

Permalink
crash on toggle background layers if a layer is not selected
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinBuira committed Feb 5, 2025
1 parent bd429f0 commit f37b510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mergin/version_viewer_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def toggle_background_layers(self, checked):
self.update_canvas(layers, set_extent=False)

def update_canvas(self, layers, set_extent=True):
if self.current_diff.isSpatial() == False:
if self.current_diff and self.current_diff.isSpatial() == False:
self.map_canvas.setEnabled(False)
self.save_splitters_state()
self.splitter_map_table.setSizes([0, 1])
Expand Down

0 comments on commit f37b510

Please sign in to comment.