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 authored and timlinux committed Nov 21, 2011
1 parent 0b1afb0 commit d0cf9dfeda1a211788c0bc4554069c2cb43229bd
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -188,7 +188,14 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
}

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

0 comments on commit d0cf9df

Please sign in to comment.