Skip to content
Permalink
Browse files

Merge 24663d5 into cherry-pick-backport-9640-on-release-3_6-f8a91c38-…

…ab77-4f16-b1ee-8b9af1f271ec
  • Loading branch information
backporting committed Mar 28, 2019
2 parents 715aa48 + 24663d5 commit 120b733060ebc8b8899b098d1b33367f05ded070
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/processing/qgsprocessingutils.cpp
@@ -368,12 +368,12 @@ bool QgsProcessingUtils::canUseLayer( const QgsMeshLayer *layer )
bool QgsProcessingUtils::canUseLayer( const QgsRasterLayer *layer )
{
// only gdal file-based layers
return layer && layer->providerType() == QStringLiteral( "gdal" );
return layer && layer->isValid();
}

bool QgsProcessingUtils::canUseLayer( const QgsVectorLayer *layer, const QList<int> &sourceTypes )
{
return layer &&
return layer && layer->isValid() &&
( sourceTypes.isEmpty()
|| ( sourceTypes.contains( QgsProcessing::TypeVectorPoint ) && layer->geometryType() == QgsWkbTypes::PointGeometry )
|| ( sourceTypes.contains( QgsProcessing::TypeVectorLine ) && layer->geometryType() == QgsWkbTypes::LineGeometry )

0 comments on commit 120b733

Please sign in to comment.
You can’t perform that action at this time.