Skip to content
Permalink
Browse files
OGR provider: don't segfault when the layer cannot be retrieved (e.g.…
… datasource with 0 layer)
  • Loading branch information
rouault committed Nov 20, 2011
1 parent 555e028 commit 7f1ca279007c0b221525e2f96bbbf57a92111539
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 7f1ca27

Please sign in to comment.