Skip to content

Commit ead85b1

Browse files
authoredJan 27, 2021
Make the db managers import function more robust towards (some types of) invalid layers.
Fix #41152
1 parent f3632e8 commit ead85b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎python/plugins/db_manager/dlg_import_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def populateLayers(self):
132132
for nodeLayer in QgsProject.instance().layerTreeRoot().findLayers():
133133
layer = nodeLayer.layer()
134134
# TODO: add import raster support!
135-
if layer.type() == QgsMapLayerType.VectorLayer:
135+
if layer is not None and layer.type() == QgsMapLayerType.VectorLayer:
136136
self.cboInputLayer.addItem(layer.name(), layer.id())
137137

138138
def deleteInputLayer(self):

0 commit comments

Comments
 (0)
Please sign in to comment.