Skip to content
Permalink
Browse files
Merge pull request #64 from rouault/master
OGR provider: don't segfault when the layer cannot be retrieved (e.g. datasource with 0 layer)
  • Loading branch information
timlinux committed Nov 21, 2011
2 parents 555e028 + 7f1ca27 commit c82868333b6955af906655ce8a5826f071ead072
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -294,7 +294,14 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
}

ogrLayer = ogrOrigLayer;
setSubsetString( mSubsetString );
if (ogrLayer != NULL )
{
setSubsetString( mSubsetString );
}
else
{
valid = false;
}
}
else
{

0 comments on commit c828683

Please sign in to comment.