Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make the db managers import function more robust towards (some types …
…of) invalid layers.

Fix #41152
  • Loading branch information
sickel authored and nyalldawson committed Jan 27, 2021
1 parent 49a94c7 commit 824abc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -132,7 +132,7 @@ def populateLayers(self):
for nodeLayer in QgsProject.instance().layerTreeRoot().findLayers():
layer = nodeLayer.layer()
# TODO: add import raster support!
if layer.type() == QgsMapLayerType.VectorLayer:
if layer is not None and layer.type() == QgsMapLayerType.VectorLayer:
self.cboInputLayer.addItem(layer.name(), layer.id())

def deleteInputLayer(self):
Expand Down

0 comments on commit 824abc2

Please sign in to comment.